Thursday, June 3, 2010

Strings strings strings

Hey guys,

Todays class was interesting to say the least for the tangent Fardad went off on strings.

Basically:

char hello[50] = "hello everyones, how's it going"

where, the variable hello is compatible to the string "hello everyones, how's it going"
so that you can actually do the following:

printf("%c", "hello everyones, how's it going"[5]);
which is the same as,
printf("%c", hello[5]);

The string you put the variable equal are identical to each other in the usage aspect.

No comments:

Post a Comment