Why would printf("%c ", 2293552); print 0?
ASCII values are from 0 to 127
I know this must be some cyclic thing but I want a clear explanation. Thank you
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.
The number
2293552corresponds to0x22ff30. Whenprintfinterprets it as ASCII, it ignores all bits beyond the last eight bits containing0x30, which is the code for'0'.From the C99 standard: