Friday, November 4, 2016

MCQs based on C programming Expression evaluation


Associativity of ++, -- and ! Operators in expressions evaluation are from ________.
A. left to right
B. right to left
C. none of these

An arithmetic expression without parenthesis will be evaluated from left to right using rules of precedence of operators.
A. True
B. False
C. None of these

In C programming, the statement a=a+1 and a+=1 will produce same result.
A. True
B. False
C. None of these

All the variables in expressions must be assigned values before evaluation is attempted.
A. True
B. False
C. None of these

Associativity of + and - Operators in expressions are from ________.
A. left to right
B. right to left
C. none of these

In C programming, the statement a=a*(n+1) and a=*n+1 will produce same result.
A. True
B. False

In a pretest loop if the body is executed n times the test expression is executed n+1 times.
A. True
B. False
C. None of these

Within an expression, __________ precedence operators will be evaluated first.
A. higher
B. lower
C. none of these

The __________ represents which operator should be evaluated first if an expression is containing more than one operator with same priority.
A. Priority
B. Associativity
C. none of these


* * * * *

No comments:

Post a Comment