fork download
  1. #include <stdio.h>
  2.  
  3. int main() {
  4. typedef int* ptr;
  5. ptr a; // we can use ptr in place of int*
  6. int x;
  7. x = 50;
  8. a = &x;
  9. printf("The value of x is: %d\n", x);
  10. printf("The value of x by pointer is: %d", *a);
  11. return 0;
  12. }
  13.  
Success #stdin #stdout 0s 5432KB
stdin
Standard input is empty
stdout
The value of x is: 50
The value of x by pointer is: 50