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

Home | Discussion Forum
Taiyari24Hour

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



View More Related Question

1) 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?

2) What is the output of this C code?

#include <stdio.h>
int main()
{
int a = 10;
double b = 5.6;
int c;
c = a + b;
printf("%d", c);
}

3) Consider the following code fragment:

  int a,c; c=2;
a=(c+ =5)*2
What will be the value of "a" after the above lines are executed?

4) The precedence of arithmetic operators is (from highest to lowest)

5) 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?

UP Gk Online Test

taiyari24hour.com

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