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);
No comments:
Post a Comment