Variable [MCQ] : Find Output of Program (Multiple Choice Questions)
Question 1 |
In the following expression guess the correct order of execution of operator ?
z = x - y / z * 1 % 2 + 1
/ * % - + = | |
* / % - + = | |
= / * - % + | |
= / * % - + |
Question 2 |
Which of the following are unary operators in C ?
- !
- sizeof
- ~
- &&
1 2 | |
3 4 | |
1 2 3 | |
1 3 |
Question 3 |
Arrange the following operators in decreasing order of Operator Precedence.
- Arithmetic Operator
- Unary Operator
- Comparison Operator
- Shift Operator
2 1 3 4 | |
1 2 3 4 | |
2 1 4 3 | |
1 2 4 3 |
Question 4 |
Arithmetic Operator has associtivity from ___________ to ____________.
Right to Left | |
Left to Right |
Question 5 |
Which of the following is correct use of Conditional Operator ?
a>b ? c=10; | |
max = a>b ? a>c?a:c:b>c?b:c | |
a>b ? c=50 : c=140; | |
a>b : c=10; |
There are 5 questions to complete.