Home / Questions / What is the syntax for ternary operator in C?
Explanatory Question

What is the syntax for ternary operator in C?

👁 763 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

Ternary operator is same as if else control statement in C.

Syntax : (Condition? true_value: false_value);

Example: (A > 100? 0: 1);