Examveda

What will be the output of the following C code?
#include <stdio.h>
int main()
{
    int y = 1;
    if (y & (y = 2))
        printf("true %d\n", y);
    else
        printf("false %d\n", y);

}

A. true 2

B. false 2

C. either true 2 or false 2

D. true 1

Answer: Option A


This Question Belongs to C Program >> C Fundamentals

Join The Discussion

Related Questions on C Fundamentals