N
niklaus
int *p=7;
int main()
{
int *p=0;
printf("%x\n",p);
return 0;
}
prints 0 on all the platforms i test or i set a breakpoint at printf
and then print the value of
p just after int *p=0, i get 0.
Is there any difference in this case from C . Does C++ differ from C in
this case.
the behaviour is implementation defined according to
http://www.vmunix.com/~gabor/c/draft.html#6.2.2.3
Can someone tell me why it s implementation defined and where it
differs ,
can't i say value of p after int *p=0 or int *p=3 is 0 or 3
int main()
{
int *p=0;
printf("%x\n",p);
return 0;
}
prints 0 on all the platforms i test or i set a breakpoint at printf
and then print the value of
p just after int *p=0, i get 0.
Is there any difference in this case from C . Does C++ differ from C in
this case.
the behaviour is implementation defined according to
http://www.vmunix.com/~gabor/c/draft.html#6.2.2.3
Can someone tell me why it s implementation defined and where it
differs ,
can't i say value of p after int *p=0 or int *p=3 is 0 or 3