SyntaxFix
Write A Post
Hire A Developer
Questions
Just to add: you also get different values for their sizes.
printf("sizeof s[] = %zu\n", sizeof(s)); //6 printf("sizeof *s = %zu\n", sizeof(s)); //4 or 8
As mentioned above, for an array '\0' will be allocated as the final element.
'\0'