Listing 3 Shows that a string literal is an anonymous array
/* array3.c */ #include <stdio.h> main() { char a[] = "hello"; char *p = a; printf("a == %p, sizeof a == %d\n",a,sizeof a); printf("p == %p, sizeof p == %d\n",p,sizeof p); printf("sizeof \"hello\" == %d\n",sizeof "hello"); printf("address of \"hello\" == %p\n","hello"); printf("address of \"hello\" == %p\n","hello"); return 0; } /* Output a == FFFO, sizeof a == 6 p == FFFO, sizeof p == 2 sizeof "hello" == 6 address of "hello" == 0118 address of "hello" == 0138 */ /* End of File */