Home » C++ Programming » Data Types » Question
  1. What is the value of the following 8-bit integer after all statements are executed?
    int a = 5;
    a = a << 6;
    a = a >> 6;
    1. Implementation defined
    2. -1
    3. 127
    4. 1
    5. None of these
Correct Option: A

Right shift of signed integers is undefined, and has implementation-defined behaviour.



Your comments will be displayed only after manual approval.