I have the following piece of code:
#include #include int main(int argc, char *argv[]) { int n = 260; int *p = &n;
Your problem is the assignment *pp = 0; You're dereferencing pp which points to n, and changing n. However, pp is a char pointer so it doesn't change all of n which is an int. This causes the binary complications in the other answers.