GATE 2017 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2017 (Session 2)

65 questions

MCQ 45 · NAT 201-mark 30 · 2-mark 35

Questions 21–25 of 65

Q21Propositional Logic1 markMCQ−0.33 if wrong
Let p, q, r denote the statements "It is raining ," It is cold", and " It is pleasant," respectively. Then the statement "It is not raining and it is pleasant, and it is not pleasant only if it is raining and it is cold" is represented by

Q22Number System1 markMCQ−0.33 if wrong
Given the following binary number in 32-bit (single precision) IEEE-754 format:
00111110011011010000000000000000
The decimal value closest to this floating- point number is

Q23Queue1 markMCQ−0.33 if wrong
A circular queue has been implemented using a single 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 operation can be performed in O (1) time ?

I. Next pointer of front node points to the rear node.
II. Next pointer of rear node points to the front node.

Q24Array and Pointer1 markMCQ−0.33 if wrong
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

Q25Graph Theory1 markMCQ−0.33 if wrong
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?
M N O R Q P