Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

iOS Objective-C Basics (Retired) Functional Programming in C Control Flow - For Loops

AJ Perez
PLUS
AJ Perez
Courses Plus Student 969 Points

uses of symbols!

hi guys! i'm totally new to C lingo and just completed the first stage of the C introduction. can someone make a list of what each symbol means and the function?

1: [ ] 2: , 3: ; 4: { } 5: \ 6: n 7: " 8: % 9: (adding spaces? if this affects the outcome of the code at all?)

thanks!! i didn't want to go on with my studies not understanding the true purpose of each of these.

1 Answer

[] = I think of arrays, or enclosing commands such as NSArray *myArray = [NSArray arrayWithObjects:@"One",@"Two",@"Three",@"Four",@"Five"];

; = End of statement command.

{} = Dictionary Set

\ = Escape char, end line.

"" = Enclose strings.

% = Modulus/Remainder from calculation div.

: = Seperator, passing values.

Adding spaces such not make too much of a difference in this modern age of programming, although, I would recommend using proper spaces when you can, or observe proper formatting.

Anyone, correct or give a more detailed explanation.