Multiple Choice Questions
Question 1
Which of the following is the correct precedence of logical operators?
- !, &&, ||
 - &&, !, ||
 - ||, !, &&
 - &&, ||, !
 
Question 2
Choose the odd one out from the following:
- >
 - ==
 - &&
 - <
 
Question 3
Given: String st = (a>= 90)? "Excellent": "Best";
Predict the output, when a = 90.
- Best
 - Excellent: Best
 - Best: Excellent
 - Excellent
 
Question 4
Choose the odd one out from the following:
- Unary operator
 - Binary operator
 - Ternary operator
 - Bitwise operator
 
Question 5
Given: x += x++ + ++x + --x
Find the value, when x=5.
- 23
 - 21
 - 22
 - 24
 
No comments:
Post a Comment