uint8_t a = 0x1234;
Will a == 34? Is this because 0x34 is the first byte?
If so, how do I perform checks to ensure that the value I assign to a does not exceed the size of uint8_t?
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.
It does indeed behave like that. GCC gives you a warning if you do it.