Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 1;
    if (x > 0)
        printf("inside if\n");
    else if (x > 0)
        printf("inside elseif\n");
}

A. inside if

B. inside elseif

C. inside if
inside elseif

D. compile time error

Answer: Option A


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures