Bitwise & and | are unary operators
Answer: B
No answer description available for this question.
Enter details here
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
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
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
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
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
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
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
Bitwise | can be used to set multiple bits in number.
Answer: A
No answer description available for this question.
Enter details here