Top

Discussion

What will be the output of the following C code?

#include 
    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: A

No answer description available for this question.

No comment is present. Be the first to comment.
Loading…

Post your comment