Advertisement
Guest User

Untitled

a guest
Apr 23rd, 2018
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.43 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(){
  3.    int* pc;
  4.    int c;
  5.    c=22;
  6.    printf("Address of c:%u\n",&c);
  7.    printf("Value of c:%d\n\n",c);
  8.    pc=&c;
  9.    printf("Address of pointer pc:%u\n",pc);
  10.    printf("Content of pointer pc:%d\n\n",*pc);
  11.    c=11;
  12.    printf("Address of pointer pc:%u\n",pc);
  13.    printf("Content of pointer pc:%d\n\n",*pc);
  14.    *pc=2;
  15.    printf("Address of c:%u\n",&c);
  16.    printf("Value of c:%d\n\n",c);
  17.    return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement