if (i > 100)
{
  j = "Big";
}
else
{
  j = "Small";
}
Answer: j = (i > 100) ? "Big" : "Small" ;

The operator used to reduce the if..else statement to a one line statement is called ternary operator. A ternary operator is an operator which requires three variables to operate on.

About our authors: Team EQA

You have viewed 1 page out of 252. Your C learning is 0.00% complete. Login to check your learning progress.

#