Consider the following code. int fun() { if(isEmpty()) { return -10; } else {…
PYQ Cognizant GenC 2024
Consider the following code.
int fun()
{
if(isEmpty())
{
return -10;
}
else
{
int n;
n= q[front];
front++;
return n;
}
}
Which operation does the above code perform?
- A.
Enqueue
- B.
Dequeue
- C.
Return the front element
- D.
Both b and c
Attempted by 482 students.
Sign up free to check your answer
Sign up freeLoading lesson…

