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: a
Related Posts
Which of the following is false about a doubly linked list?
Which of these is not an application of a linked list?
What is the space complexity for deleting a linked list?
What is the time complexity to count the number of elements in the linked list?
What is the time complexity of inserting at the end in dynamic arrays?
Which of the following is not a disadvantage to the usage of array?
What is the space complexity of a linear queue having n elements?
Join The Discussion