What is a ternary operator in C?

LAST READ: APR 16 2024 | Q. BY: MOHIT SINGH

A

Anurag Mishra

Ternary Operator

The ternary operator is also known as the conditional operator. A ternary operator is a group of : and ? symbols in a specified sequence given below.

Condition ? Expression1 : Expression2

Working...

If the condition is true then expression 1 will be executed and if the condition is false then Expression2 will be executed.

0 votes

Your Answer

Email Us: advertise@gdatamart.com

Donate Us: Support to GDATAMART

LifeStyle & Fun

© 2024 GDATAMART.COM (All Rights Reserved)