What will be the output of the following C code?
#include <stdio.h>
int main()
{
int x = 2, y = 0;
int z;
z = (y++, y);
printf(“%d\n”, z);
return 0;
}
a) 0
b) 1
c) Undefined behaviour
d) Compilation error
Answer: b
Related Posts
A Double-ended queue supports operations such as adding and removing items from both the sides of the queue. They support four operations like addFront(adding item to top of the queue), addRear(adding item to the bottom of the queue), removeFront(removing item from the top of the queue) and removeRear(removing item from the bottom of the queue). You are given only stacks to implement this data structure. You can implement only push and pop operations. What are the total number of stacks required for this operation?(you can reuse the stack)
What is the need for a circular queue?
What does the following Java code do?
public Object function()
{
if(isEmpty())
return -999;
else
{
Object high;
high = q[front];
return high;
}
}What is the term for inserting into a full queue known as?
In a circular queue, how do you increment the rear end of the queue?
Which of the following properties is associated with a queue?
Minimum number of queues to implement stack is ___________
Join The Discussion