Bitwise can be used to reverse a sign of a number.
Answer: B
No answer description available for this question.
Enter details here
Bitwise can be used to perform addition and subtraction.
Answer: B
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
int main()
{
int y = 0;
if (1 |(y = 1))
printf("y is %d\n", y);
else
printf("%d\n", y);
}
Answer: A
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
int main()
{
printf("%d >> %d %d >> %d\n", 4 >> 1, 8 >> 1);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
What will be the output of the following C code?
#include
int main()
{
unsigned int a = 10;
a = ~a;
printf("%d\n", a);
}
Answer: C
No answer description available for this question.
Enter details here
What will be the output of the program?
#include
int main()
{
char c=48;
int i, mask=01;
for(i=1; i<=5; i++)
{
printf("%c", c|mask);
mask = mask<<1>
Answer: B
No answer description available for this question.
Enter details here
Bitwise | can be used to set a bit in number.
Answer: A
No answer description available for this question.
Enter details here
Predict the output of following program.
#include
int main()
{
int a=10;
int b=2;
int c;
c=(a & b);
printf("c= %d",c);
return 0;
}
Answer: C
No answer description available for this question.
Enter details here
Which bitwise operator is suitable for checking whether a particular bit is on or off?
Answer: B
No answer description available for this question.
Enter details here
Left shifting an unsigned int or char by 1 is always equivalent to multiplying it by 2.
Answer: A
No answer description available for this question.
Enter details here