CS-301 Final Term Exams Preparation Virtual University MCQs With Answers
Question # 1
I have implemented the queue with a linked list, keeping track of a front pointer and a rear pointer. Which of
these pointers will change during an insertion into an EMPTY queue?
Suppose currentNode refers to a node in a linked list(using the Node class with member variables called data and next node),What statement changes currentNode so that it refers to the next node?
Here is a small function definition:
void f(int i, int &k)
{
i = 1;
k = 2;
}
Suppose that a main program has two integer variables x and y, which are given the value 0. Then the main
program calls f(x,y); What are the values of x and y after the function f finishes?