char a[3];
int x=9;
int y=8;
a[0]=(char)x;
a[1]=(char)y;
a[2]='\0';
unsigned char * temp=(unsigned char*)a;
but when i am displaying this temp, it’s displaying ?8. should display 98.
can anyone please help???
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You were giving a value of 9 and 8, instead of their ASCII values.