# GATE Computer Science Solved Paper 2017 Session II - Part 1

Q.1 - Q.25 carry one mark each.

1.       The representation of the value of a 16-bit unsigned integer X in hexadecimal number system is BCA9. The representation of the value of X in octal number system is
(A) 571244
(B) 736251
(C) 571247
(D) 136251
2.       Match the following:
(A) P→(ii), Q→(iv), R→(i), S→(iii)
(B) P→(ii), Q→(i), R→(iv), S→(iii)
(C) P→(ii), Q→(iv), R→(iii), S→(i)
(D) P→(iii), Q→(iv), R→(i), S→(ii)
3.       Match the algorithms with their time complexities:
(A) P→(iii), Q→(iv), R→(i), S→(ii)
(B) P→(iv), Q→(iii), R→(i), S→(ii)
(C) P→(iii), Q→(iv), R→(ii), S→(i)
(D) P→(iv), Q→(iii), R→(ii), S→(i)
4.       Let L1, L2 be any two context-free languages and R be any regular language. Then which of the following is/are CORRECT?
I. L1 U L2 is context-free.
II. L1’ is context-free.
III. L1 - R is context-free.
W L1 ∩ L2 is context-free.
(A) I, II and IV only
(B) I and III only
(C) II and IV only
(D) I only
5.       Match the following according to input (from the left column) to the compiler phase (in the right column) that processes it:
(A) P→(ii), Q→(iii), R→(iv), S→(i)
(B) P→(ii), Q→(i), R→(iii), S→(iv)
(C) P→(iii), Q→(iv), R→(i), S→(ii)
(D) P→(i), Q→(iv), R→(ii), S→(iii)

6.       Which of the following statements about parser is/are CORRECT?
I. Canonical LR is more powerful than SLR.
II. SLR is more powerful than LALR.
III. SLR is more powerful than Canonical LR.
(A) I only
(B) II only
(C) III only
(D) II and III only
7.       Which of the following is/are shared by all the threads in a process?
I. Program counter
II. Stack
IV. Registers
(A) I and II only
(B) III only
(C) IV only
(D) III and IV only
8.       In a file allocation system, which of the following allocation scheme(s) can be used if no external fragmentation is allowed?
I. Contiguous
III. Indexed
(A) I and III only
(B) II only
(C) III only
(D) II and III only
9.       Consider the following statements about the routing protocols, Routing Information Protocol (RIP) and Open Shortest Path First (OSPF) in an IPv4 network.
I: RIP uses distance vector routing
II: RIP packets are sent using UDP
III: OSPF packets are sent using TCP
IV: OSPF operation is based on link-state routing
Which of the statements above are CORRECT?
(A) I and IV only
(B) I, II and III only
(C) I, II and IV only
(D) II, III and IV only