Multiple choice

Find the output of the following code in C language, if assumed that all preprocessor directives are correct. void main ( ) { int a = 2, b = 2; if (a > 2)
if (b > 2)
printf ( "Hello"); Else
Printf ("Hi"); }

  1. Hello

  2. Hi

  3. Error in execution

  4. Normal program execution without any output

  5. Program code error

Reveal answer Fill a bubble to check yourself
D Correct answer
Explanation

First IF statement is not satisfied  hence,  control will  go to second if,  as it is a statment for first IF and ELSE statement will take priority for second IF which is jumped by control.  Hence,  no output will be coming in print however program will run normally.