Top

Bitwise Operators

41.

Bitwise | can be used to multiply a number by powers of 2.

Answer: B

No answer description available for this question.
 

Enter details here

42.

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

Answer: B

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

Enter details here

43.

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

Answer: B

No answer description available for this question.

Enter details here

44.

Bitwise & can be used to check if a bit in number is set or not.

Answer: A

No answer description available for this question.
 

Enter details here

45.

What will be the output of the program ?

#include

int main()
{
    int i=4, j=8;
    printf("%d, %d, %d\n", i|j&j|i, i|j&&j|i, i^j);
    return 0;
}

 

Answer: C

No answer description available for this question.
 

Enter details here

46.

In the statement expression1 >> expression2. if expression1 is a signed integer with its leftmost bit set to 1 then on right shifting it the result of the statement will vary from computer to computer

Answer: A

No answer description available for this question.
 

Enter details here

47.

Bitwise & can be used to check if more than one bit in a number is on.

Answer: A

No answer description available for this question.
 

Enter details here

48.

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

#include

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

 

Answer: A

No answer description available for this question.
 

Enter details here

49.

Bitwise can be used to reverse a sign of a number.

Answer: B

No answer description available for this question.
 

Enter details here

50.

What will be the output of the program?

#include

int main()
{
    unsigned char i = 0x80;
    printf("%d\n", i<<1>

 

Answer: B

No answer description available for this question.
 

Enter details here

Loading…
Tags: Bitwise Operators Questions and Answers || Bitwise Operators MCQ Questions and Answers || Bitwise Operators GK Questions and Answers || Bitwise Operators GK MCQ Questions || Bitwise Operators Multiple Choice Questions and Answers || Bitwise Operators GK || GK on Bitwise Operators || C Programming Questions and Answers || C Programming MCQ Questions and Answers || C Programming GK Questions and Answers || GK on C Programming