CP DML Q34

0. The following program fragment

if (2 < 1)
;
else
x = (2 < 0) ? printf("one") : printf("four");
printf ("%d", x);

  • Option : D
  • Explanation :
    here else clause will be executed . Since 2 < 0 is false , 4 will be printed
Cancel reply

Your email address will not be published. Required fields are marked *


Cancel reply

Your email address will not be published. Required fields are marked *