V
venkatarao0
Hi Friends,
I got problem hear,
C++ File:
const int val=0;
int *ptr = (int *)&val;
*ptr = 55;
cout<<val<<endl; // out put 0
cout<<*ptr<<endl; // out put 55
in debugging val & *ptr are showing 55 only,
but while printing val it is showing '0' as out put
while printing *ptr it is showing '55' as out put
what is the problem, i am unable to get could u pls help me out.
I got problem hear,
C++ File:
const int val=0;
int *ptr = (int *)&val;
*ptr = 55;
cout<<val<<endl; // out put 0
cout<<*ptr<<endl; // out put 55
in debugging val & *ptr are showing 55 only,
but while printing val it is showing '0' as out put
while printing *ptr it is showing '55' as out put
what is the problem, i am unable to get could u pls help me out.