GATE 2020 Computer Science and Information Technology (CS) Questions with Solutions

GATE 2020

64 questions

MCQ 41 · NAT 231-mark 29 · 2-mark 35

Questions 16–20 of 64

Q16AVL Tree1 markMCQ−0.33 if wrong
What is the worst case time complexity of inserting n2n^2 elements into an AVL-tree with n elements initially?

Q18Regular Language1 markMCQ−0.33 if wrong
Consider the following statements.

I. If L1∪L2L_1\cup L_2 is regular, then both L1  and  L2L_1 \; and \; L_2 must be regular.
II. The class of regular languages is closed under infinite union.

Which of the above statements is/are TRUE?

Q19Lexical Analysis1 markMCQ−0.33 if wrong
Consider the following statements.

I. Symbol table is accessed only during lexical analysis and syntax analysis.
II. Compilers for programming languages that support recursion necessarily need heap storage for memory allocation in the run-time environment.
III. Errors violating the condition 'any variable must be declared before its use' are detected during syntax analysis.

Which of the above statements is/are TRUE?

Q20Context Free Language1 markMCQ−0.33 if wrong
Consider the language L={an∣n≥0}∪{anbn∣n≥0}L=\{a^n|n\geq 0\}\cup \{a^nb^n|n\geq 0\} and the following statements.

I. L is deterministic context-free.
II. L is context-free but not deterministic context-free.
III. L is not LL(k) for any k.

Which of the above statements is/are TRUE?

Q21Memory Management1 markMCQ−0.33 if wrong
Consider allocation of memory to a new process. Assume that none of the existing holes in the memory will exactly fit the process's memory requirement. Hence, a new hole of smaller size will be created if allocation is made in any of the existing holes. Which one of the following statement is TRUE?