fork(1) download
  1. #include <stdio.h>
  2.  
  3. int main(int argc, char **argv) {
  4. char str1[] = "Hello";
  5. char *str2 = "Goodbye";
  6. char **ptrStr2 = &str2;
  7.  
  8. printf("%p %p %s\n", (void*)&str1, (void*)str1, str1);
  9. printf("%p %p %s\n", (void*)&str2, (void*)str2, str2);
  10. printf("%p %s\n", (void*)*ptrStr2, *ptrStr2);
  11. }
Success #stdin #stdout 0s 9432KB
stdin
Standard input is empty
stdout
0x7ffc4ddc66f0 0x7ffc4ddc66f0 Hello
0x7ffc4ddc66e8 0x2b7251d9c804 Goodbye
0x2b7251d9c804 Goodbye