Top

Bitwise Operators

71.

Bitwise & and | are unary operators

Answer: B

No answer description available for this question.
 

Enter details here

72.

What will be the output of the program?

#include

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

 

Answer: B

No answer description available for this question.

Enter details here

73.

What will be the output of the following C code?

#include 
    void main()
    {
        int x = 97;
        int y = sizeof(x++);
        printf("x is %d", x);
    }

 

Answer: A

No answer description available for this question.

Enter details here

74.

What will be the output of the program?

#include

int main()
{
    unsigned int res;
    res = (64 >>(2+1-2)) & (~(1<<2>

 

Answer: A

No answer description available for this question.
 

Enter details here

75.

Which of the following statements are correct about the program?

#include

int main()
{
    unsigned int num;
    int c=0;
    scanf("%u", #);
    for(;num;num>>=1)
    {
        if(num & 1)
            c++;
    }
    printf("%d", c);
    return 0;
}

 

Answer: A

No answer description available for this question.

Enter details here

76.

Which Bitwise Operator can be used to check whether a number is EVEN or ODD quickly?

Answer: A

No answer description available for this question.
 

Enter details here

77.

What will be the output of the program ?

#include

int main()
{
    int i=32, j=0x20, k, l, m;
    k=i|j;
    l=i&j;
    m=k^l;
    printf("%d, %d, %d, %d, %d\n", i, j, k, l, m);
    return 0;
}

 

Answer: C

No answer description available for this question.
 

Enter details here

78.

Predict the output of following program.

#include 

int main()
{
 char var=0x04;

 var = var | 0x04;
 printf("%d,",var);
 var |= 0x01;
 printf("%d",var);
 
 return 0;
}

 

Answer: B

No answer description available for this question.
 

Enter details here

79.

Bitwise | can be used to set multiple bits in number.

Answer: A

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