Friday, November 4, 2016

Answer of MCQs based on C programming Expression evaluation

C programming Expression evaluation - Answers

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

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
ANSWER: A

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

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

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

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

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
ANSWER: A

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

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

ANSWER: B


No comments:

Post a Comment