Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- static const int a = 3; // I promise I won't change a
- int main(void)
- {
- const int *ptr_to_a = &a; // I still promise I won't change a
- int *ptr;
- ptr = ptr_to_a;
- *ptr = 5;
- printf("%d\n", a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement