Advertisement
Guest User

Untitled

a guest
Mar 27th, 2013
136
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. static const int a = 3; // I promise I won't change a
  4.  
  5. int main(void)
  6. {
  7. const int *ptr_to_a = &a; // I still promise I won't change a
  8. int *ptr;
  9. ptr = ptr_to_a;
  10. *ptr = 5;
  11.  
  12. printf("%d\n", a);
  13.  
  14. return 0;
  15. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement