Hello Everyone ,
I've this strange problem with using char pointer in my c++ programme with the gcc compiler (version 3.4.2).
char a='A'; char *c=&a; printf("%p %c\n",c,*c); std::cout<<c<<" "<<*c<<std::endl;
I expect the output of printf and cout to be same but why am I getting strange output like this.
Ah " A
Now If I change char a='A' with char a='C'
output is :-
Ch " C
Is their anyone who can explain this. Thank you a million in advance. Please help me .
Edited 6 Years Ago by Efficience: n/a