Examveda
Examveda

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

A. true

B. false

C. compile time error

D. undefined behaviour

Answer: Option B


This Question Belongs to C Program >> Control Structures

Join The Discussion

Related Questions on Control Structures