1
visibility

Predict the output ?
int x = 90;
char c = (x<=90)?'Z':'I';

  • I

  • Z

  • 90

  • Syntax Error

As value of x is 90 so condition of ternary operator is true. Variable c is assigned the value of expression 1 which is Z.