Advertisement
Guest User

Untitled

a guest
Jul 27th, 2017
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. /* Define an int and int*.
  2.  
  3. Initialize the int* to the address of the int. Initialize the int to 777 via the pointer (indirectly). Print the value of the int to the console via the pointer (indirectly).
  4.  
  5.  
  6.  
  7. Sample Run:
  8.  
  9. x is 777.
  10.  
  11. */
  12.  
  13. #include <stdio.h>
  14.  
  15. int main()
  16. {
  17.  
  18. int *intA;
  19. intA = 777;
  20.  
  21. printf("Value of intA is %d.\n", intA);
  22.  
  23. return 0;
  24.  
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement