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

Q If an unsigned int is 2 bytes wide then, What will be the output of the program?

#include<stdio.h>

int main()
{
    unsigned int a=0xffff;
    ~a;
    printf("%x\n", a);
    return 0;
}

Question ID
#1170
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 ffff
  • B 0000
  • C 00ff
  • D ddfd
Correct Answer: A

Explanation

Option A

Share This Question

Share this MCQ with your friends or study group.