LearnFrenzy
Sign in Take a free test

Operators and Expressions · Operators MCQ · Question 6

What does a relational operator return in C? Answer, explanation & discussion

  • MCQ
  • Easy
  • 0 comments
  • Answer explained
  • Moderated community
Question 6 Back to Exercise

What is the type and value of (5 > 3)?

  • A bool true
  • B int 1 Correct
  • C char 'T'
  • D Any non-zero value
Correct Answer: Option B

Relational, equality and logical operators always produce an int: exactly 1 or 0. That remains true in C23, even though bool is now a keyword.

Discussion & Comments 0

Share your method, a shortcut, or ask about a step you didn't follow.

No comments yet. Be the first to share your solution!

Post your comment

Comments appear after a quick review by our team.

Search LearnFrenzy

Esc

Quick links