Operators

Q1:
Which of the following statements are correct about the following code snippet?
int a = 10; 
int b = 20;
bool c;
c = !(a > b);
  1. There is no error in the code snippet.
  2. An error will be reported since ! can work only with an int.
  3. A value 1 will be assigned to c.
  4. A value True will be assigned to c.
  5. A value False will be assigned to c.

A 1, 4

B 4, 5

C None of these

D 1, 3

E 2, 4

ANS:D - 1, 4

No answer description is available. Let's discuss.



img not found
img

For help Students Orientation
Mcqs Questions

One stop destination for examination, preparation, recruitment, and more. Specially designed online test to solve all your preparation worries. Go wherever you want to and practice whenever you want, using the online test platform.