fork(1) download
  1. #include<stdio.h>
  2. #include<stdlib.h>
  3.  
  4. int main(){
  5.  
  6. printf("%d\n",sizeof(char*));
  7.  
  8. char* test1 = "ABCDEFGHIJK";
  9. int* test2 = "ABCD";
  10.  
  11. printf("test1 = %s\n",test1);
  12. printf("test2 = %s\n",test2);
  13.  
  14. printf("Address of test1 = %p\n",test1);
  15. printf("Address of test2 = %p\n",test2);
  16.  
  17. printf("Address of *test1 = %p\n",*test1);
  18. printf("Address of *test2 = %p\n",*test2);
  19.  
  20. return 0;
  21. }
Success #stdin #stdout 0s 2292KB
stdin
Standard input is empty
stdout
4
test1 = ABCDEFGHIJK
test2 = ABCD
Address of test1 = 0x80485a4
Address of test2 = 0x80485bc
Address of *test1 = 0x41
Address of *test2 = 0x44434241