fork download
  1. #include <stdio.h>
  2.  
  3. int main(void)
  4. {
  5. long value1 = 200000;
  6. long value2;
  7.  
  8. long *lPtr;
  9.  
  10. lPtr = &value1;
  11.  
  12. printf("The value of *lPtr is %ld\n",
  13. *lPtr);
  14.  
  15. value2 = *lPtr;
  16.  
  17. printf("The value of value2 is %ld\n",
  18. value2);
  19.  
  20. printf("The address of value1 is %p\n",
  21. (void *)&value1);
  22.  
  23. printf("The address stored in lPtr is %p\n",
  24. (void *)lPtr);
  25.  
  26. return 0;
  27. }
Success #stdin #stdout 0s 5224KB
stdin
Standard input is empty
stdout
The value of *lPtr is 200000
The value of value2 is 200000
The address of value1 is 0x7ffcf6cf1440
The address stored in lPtr is 0x7ffcf6cf1440