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 11–15 of 65

Q11Number System1 markMCQ−0.33 if wrong
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

Q12Array and Pointer1 markMCQ−0.33 if wrong
Match the following:
(P) static char var;(i) Sequence of memory locations to store addresses
(Q) m = malloc(10);
m = NULL;
(ii) A variable located in data section of memory
(R) char *ptr[10];(iii) Request to allocate a CPU register to store data
(S) register int var1;(iv) A lost memory which cannot be freed

Q13Asymptotic Notation1 markMCQ−0.33 if wrong
Match the algorithms with their time complexities:
Algorithm Time complexity P. Towers of Hanoi with n disks i. θ(n2) Q. Binary search given n sorted numbers ii. θ(n log n) R. Heap sort given n numbers at the worst case iii. θ(2n) S. Addition of two n × n matrices iv. θ(log n)

Q14Context Free Language1 markMCQ−0.33 if wrong
Let L1,L2L_{1},L_{2} be any two context free languages and R be any regular language. Then which of the following is/are CORRECT ?
I. L1∪L2L_{1}\cup L_{2} is context - free
II. L1ˉ\bar{L_{1}} is context - free
III. L1−RL_{1} - R is context - free
IV. L1∩L2L_{1}\cap L_{2} is context - free

Q15Matching1 markMCQ−0.33 if wrong
Match the following according to input (from the left column) to the complier phase (in the right column) that processes it.
Column-1 Column-2 P.Syntax treei.Code generator Q.Character streamii.Syntax analyzer R.Intermediate representationiii.Semantic analyzer S.Token streamiv.Lexical analyzer