Computer Science and Information Technology
2017 · Paper 2
Take it one question at a time. Try an answer, then check your understanding.
Complete GATE CSE 2017 Paper 2 overview, original pages and practice · Timed previous-paper practice
Questions 13–15 of 65. Imported answers require review unless explicitly marked reviewed.
Question 13
Open questionCSMCQ1 markNeeds review
A circular queue has been implemented using a singly linked list where each node consists of a value and a single pointer pointing to the next node. We maintain exactly two external pointers FRONT and REAR pointing to the front node and the rear node of the queue, respectively. Which of the following statements is/are CORRECT for such a circular queue, so that insertion and deletion operations can be performed in
time?I. Next pointer of front node points to the rear node.
II. Next pointer of rear node points to the front node.
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 14
Open questionCSMCQ1 markNeeds review
Consider the following function implemented in C:
void printxy(int x, int y) {
int *ptr;
x = 0;
ptr = &x;
y = *ptr;
*ptr = 1;
printf("%d,%d", x, y);
}
The output of invoking printxy(1,1) is
Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answerQuestion 15
Open questionCSMCQ1 markNeeds review
The Breadth First Search (BFS) algorithm has been implemented using the queue data structure. Which one of the following is a possible order of visiting the nodes in the graph below?

Your answerChoose one option.
Log in to check the answer
You can attempt this question now. Sign in to view the answer key, explanations and discussion.Log in to check answer