Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 3, i = 0;
    do {
        x = x++;
        i++;
    } while (i != 3);
    printf("%d\n", x);
}

A. Undefined behaviour

B. Output will be 3

C. Output will be 6

D. Output will be 5

Answer: Option B


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals