MCQ Practice Single Best Answer Topic: Operators and Enums in C Language

Q What will be the output of the program?

#include<stdio.h>

int main()
{
    printf("%d %d\n", 32<<1, 32<<0);
    printf("%d %d\n", 32<<-1, 32<<-0);
    printf("%d %d\n", 32>>1, 32>>0);
    printf("%d %d\n", 32>>-1, 32>>-0);
    return 0;
}

Question ID
#1191
Subchapter
Operators and Enums in C Language
Action
Choose one option below

Choose Your Answer

Click an option to check whether your answer is correct.

  • A Garbage values
  • B 64 32
    0 32
    16 32
    0 32
  • C All zeros
  • D 8 0
    0 0
    32 0
    0 16
Correct Answer: B

Explanation

Option B

Share This Question

Share this MCQ with your friends or study group.