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

Home | Discussion Forum
Taiyari24Hour

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



View More Related Question

1) Consider the following program fragment:

  main()
{
int a,b,c;
b=2;
a=2*(b++);
c=2*(++b);
}
Which one of the given answers in correct?

2) If the following variables are set to the values as shown below, then what will be the value of the following expression?

 answer=2;
marks=10;
!((answer<5)&&(marks>2))

3) Consider the following statements:

 int a=2, b=3, c=4;
a=(b++) +c;
b=a+(++c);
What are the values of a, b and c, respectively?

4) Which of the following data type will throw an error on modulus operation(%)?

5) What is the output of this C code?

#include <stdio.h>
int main()
{
int x = 2, y = 1;
x *= x + y;
printf("%d\n", x);
return 0;
}

UP Gk Online Test

taiyari24hour.com

Study 2 Online Says....
Kindly log in or signup.