LearnFrenzy
Sign in Take a free test

Decision Making · Decision Making MCQ · Question 1

What are !0 and !5 in C? Answer, explanation & discussion

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

What are the values of !0 and !5?

  • A 0 and -5
  • B 1 and 0 Correct
  • C 1 and 4
  • D true and false (bool)
Correct Answer: Option B

! gives 1 for a zero operand and 0 for any non-zero operand. The result is an int.

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