B
Bill Cunningham
I believe I have derefencing down now. If I am understanding right it
has all to do with pointers. The dereference in this code worked but for
some reason I am getting some big negative value for x before it's
dereferenced. What's wrong with the pointer here?
Bill
#include <stdio.h>
int main(void)
{
int x;
x = 2;
int *px = &x;
printf("%d\n", px);
*px = 5;
printf("%d\n", x);
return 0;
}
has all to do with pointers. The dereference in this code worked but for
some reason I am getting some big negative value for x before it's
dereferenced. What's wrong with the pointer here?
Bill
#include <stdio.h>
int main(void)
{
int x;
x = 2;
int *px = &x;
printf("%d\n", px);
*px = 5;
printf("%d\n", x);
return 0;
}