LearnFrenzy
Sign in Take a free test

Operators and Expressions · Exercise 1 of 4

Operators and Expressions Operators MCQ

  • 12 questions
  • Page 2 of 2
  • Answers explained
0Attempted
0Correct
0Wrong
Directions

Twelve multiple-choice questions on arithmetic, increment and decrement, precedence and associativity, relational and logical operators, the comma operator, sizeof and undefined expressions. Pick an option to check your answer instantly.

Question 11 Hard

Which expression computes the midpoint of two large non-negative ints lo ≤ hi without overflow?

A (lo + hi) / 2
B lo + (hi - lo) / 2
C lo / 2 + hi
D (lo * hi) / 2
Question page & discussion
Question 12 Easy

What happens with double r = 7.5 % 2;?

A r is 1.5
B A compile error: % needs integer operands; use fmod()
C r is 1
D r is 0
Question page & discussion
Up next · Exercise 2Predict the Output12 questions

Ready to test your Programming?

Timed online tests with instant scores and explanations.

Search LearnFrenzy

Esc

Quick links