Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main() {
- long num1 = 0;
- long num2 = 0;
- long *pnum = NULL;
- pnum = &num1;
- *pnum = 2; //dereferencing pointer
- ++num2;
- num2 += *pnum; //equivalent to num2 + *pnum store in num2
- pnum = &num2;
- ++*pnum;
- printf("%1d %ld %ld %ld", num1, num2, *pnum, *pnum + num2);
- getchar();
- getchar();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement