What is the meaning of the following expression in c++?
(variable1 | (variable2 << 8))
What is the meaning of it? And what does it represent?
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 concatenates the two variables.
Suppose you have two chars,
aandb.a|b<<8shifts theb8 bits to the left,|sets every bit that is inaorb.So in this example the result would be “
ab“.‘a’ is 97, ‘b’ is 98, so bitwise the following happens: