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.

Paper practice 65 questionsPage 5 of 22

Question 13

Open question
CSMCQ1 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 answer

Question 14

Open question
CSMCQ1 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 answer

Question 15

Open question
CSMCQ1 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?
Diagram for Computer Science and Information Technology question 15

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