GMgKe586q6suSQnyqZLlGCooeWM

Pages

Search

Thursday, December 16, 2010

C - String

String in C has special characteristics.
>> char s[] = "string";
>> char* s = "string";
The both above has the same meaning. It's up to you to instantiate the string variable.

If you want to printing it, use
>> printf("%s\n",s);

To know how many chars in the string, use
>> int size = sizeof(s);

Share/Bookmark

No comments:

Post a Comment