C examples for String:char array
Get addresses of strings
#define MSG "this is a test." #include <stdio.h> int main()/*w ww . j a v a 2 s . c om*/ { char ar[] = MSG; const char *pt = MSG; printf("address: %p \n", "test"); printf("address ar: %p\n", ar); printf("address pt: %p\n", pt); printf("address of MSG: %p\n", MSG); printf("address of: %p \n", "test"); return 0; }