Sail E0 Webinar

MCQs

Total Questions : 35 | Page 4 of 4 pages
Question 31.

Which bitwise operator is suitable for turning on a particular bit in a number?


  1.    && operator
  2.    & operator
  3.    || operator
  4.    | operator
 Discuss Question
Answer: Option D. -> | operator


Question 32.

Which bitwise operator is suitable for turning off a particular bit in a number?


  1.    && operator
  2.    & operator
  3.    || operator
  4.    ! operator
 Discuss Question
Answer: Option B. -> & operator


Question 33.

In which numbering system can the binary number 1011011111000101 be easily converted to?


  1.    Decimal system
  2.    Hexadecimal system
  3.    Octal system
  4.    No need to convert
 Discuss Question
Answer: Option B. -> Hexadecimal system

Hexadecimal system is better, because each 4-digit binary represents one 

Hexadecimal digit.


Question 34.

Which bitwise operator is suitable for turning off a particular bit in a number?


  1.    && operator
  2.    & operator
  3.    || operator
  4.    ! operator
 Discuss Question
Answer: Option B. -> & operator



Question 35.


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


#include<stdio.h>
int main()
{
unsigned int m = 32;
printf("%xn", ~m);
return 0;
}
  1.    ffff
  2.    0000
  3.    ffdf
  4.    ddfd
 Discuss Question
Answer: Option C. -> ffdf



Latest Videos

Latest Test Papers