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