fork download
  1. #include <stdio.h>
  2. int main(int argc, char *argv[]) {
  3. char str1[20] = "KOREA";
  4. char str2[20] = "LOVE";
  5.  
  6. printf("%c, %p\n", str1[0], &str1[0]);
  7. printf("%c, %p\n", str1[1], &str1[1]);
  8. printf("%c, %p\n", str1[2], &str1[2]);
  9. printf("%c, %p\n", str1[3], &str1[3]);
  10. printf("%c, %p\n", str1[4], &str1[4]);
  11. printf("%c, %p\n", str1[5], &str1[5]);
  12. printf("%c, %p\n", str1[6], &str1[6]);
  13.  
  14. strcat(str1, str2);
  15.  
  16.  
  17. printf("%c, %p\n", str1[0], &str1[0]);
  18. printf("%c, %p\n", str1[1], &str1[1]);
  19. printf("%c, %p\n", str1[2], &str1[2]);
  20. printf("%c, %p\n", str1[3], &str1[3]);
  21. printf("%c, %p\n", str1[4], &str1[4]);
  22. printf("%c, %p\n", str1[5], &str1[5]);
  23. printf("%c, %p\n", str1[6], &str1[6]);
  24.  
  25. return 0;
  26. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
K, 0x7fffebc243c0
O, 0x7fffebc243c1
R, 0x7fffebc243c2
E, 0x7fffebc243c3
A, 0x7fffebc243c4
, 0x7fffebc243c5
, 0x7fffebc243c6
K, 0x7fffebc243c0
O, 0x7fffebc243c1
R, 0x7fffebc243c2
E, 0x7fffebc243c3
A, 0x7fffebc243c4
L, 0x7fffebc243c5
O, 0x7fffebc243c6