Examveda
Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int x = 2, y = 2;
    float f = y + x /= x / y;
    printf("%d %f\n", x, f);
    return 0;
}

A. 2 4.000000

B. Compile time error

C. 2 3.500000

D. Undefined behaviour

Answer: Option B


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals