Examveda

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

A. 1

B. 0

C. Undefined behaviour due to order of evaluation

D. 2

Answer: Option B


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals