Single Choice Not Set

QWhat is the output of this C code?
    int main()
    {
        int y = 1;
        if (y & (y = 2))
            printf("true %d\n");
        else
            printf("false %d\n");
 
    }

ID: #1226 Operators and Enums in C Language 835 views
Question Info
#1226Q ID
Not SetDifficulty
Operators and Enums in C LanguageTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A true 2
  • B false 2
  • C Either option a or option b
  • D true 1
Correct Answer

Explanation

Option C

Share This Question

Challenge a friend or share with your study group.