addresses.c 444 B

12345678910111213141516
  1. // addresses.c -- addresses of strings
  2. #define MSG "I'm special."
  3. #include <stdio.h>
  4. int main()
  5. {
  6. char ar[] = MSG;
  7. const char *pt = MSG;
  8. printf("address of \"I'm special\": %p \n", "I'm special");
  9. printf(" address ar: %p\n", ar);
  10. printf(" address pt: %p\n", pt);
  11. printf(" address of MSG: %p\n", MSG);
  12. printf("address of \"I'm special\": %p \n", "I'm special");
  13. return 0;
  14. }