• Courses
  • Tutorials
  • Jobs
  • Practice
  • Contests

GATE CS 2022

Question 51

Which one of the following statements is TRUE for all positive functions f (n)?

  • [Tex]f(n^{2}) = \theta (f(n^{2}))  [/Tex], when f (n) is a polynomial

  • [Tex]f(n^{2}) = o (f(n^{2}))[/Tex]

  • [Tex]f(n^{2}) = O(f(n^{2}))  [/Tex], when f (n) is an exponential function

  • [Tex]f(n^{2}) = Ω(f(n^{2}))[/Tex]

Question 52

Which one of the following statements is TRUE?

  • The LALR(1) parser for a grammar G cannot have a reduce-reduce conflict if the LR(1) parser for G does not have reduce-reduce conflict.

  • The symbol table is accessed only during the lexical analysis phase. 

  • Data flow analysis is necessary for run-time memory management.

  • LR(1) parsing is sufficient for deterministic context-free languages. 

Question 53

In a relational data model, which one of the following statements is TRUE?

  • A relation with only two attributes is always in BCNF.

  • If all attributes of a relation are prime attributes, then the relation is in BCNF.

  • Every relation has at least one non-prime attribute

  • BCNF decompositions preserve functional dependencies

Question 54

Consider the problem of reversing a singly linked list. To take an example, given the linked list below, 

the reversed linked list should look like 

Which one of the following statements is TRUE about the time complexity of algorithms that solve the above problem in O(1) space?

  • The best algorithm for the problem takes [Tex]\theta (n)    [/Tex] time in the worst case

  • The best algorithm for the problem takes [Tex]\theta(nlogn)    [/Tex] time in the worst case. 

  • The best algorithm for the problem takes [Tex]\theta(n^{2})    [/Tex] time in the worst case

  • It is not possible to reverse a singly linked list in O(1) space. 

Question 55

Suppose we are given n keys, m hash table slots, and two simple uniform hash functions h1 and h2. Further, suppose our hashing scheme uses h1 for the odd keys and h2 for the even keys. What is the expected number of keys in a slot? 

  • [Tex]\frac{n}{2m}[/Tex]

  • [Tex]\frac{n}{m}[/Tex]

  • [Tex]\frac{m}{n}[/Tex]

  • [Tex]\frac{2n}{m}[/Tex]

Question 56

Which one of the following facilitates the transfer of bulk data from hard disk to main memory with the highest throughput? 

  • DMA based I/O transfer

  • Interrupt driven I/O transfer 

  • Polling based I/O transfer 

  • Programmed I/O transfer

Question 57

Let R1 and R2 be two 4-bit registers that store numbers in 2’s complement form. For the operation R1+R2, which one of the following values of R1 and R2 gives an arithmetic overflow?

  • R1 = 1011 and R2 = 1110

  • R1 = 1100 and R2 = 1010

  • R1 = 0011 and R2 = 0100

  • R1 = 1001 and R2 = 1111

Question 58

Consider the following threads, T1, T2, and T3 executing on a single processor, synchronized using three binary semaphore variables, S1, S2, and S3, operated upon using standard wait() and signal(). The threads can be context switched in any order and at any time. 

Which initialization of the semaphores would print the sequence BCABCABCA….?

  • S1 = 1; S2 = 1; S3 = 1

  • S1 = 1; S2 = 1; S3 = 0

  • S1 = 1; S2 = 0; S3 = 0

  • S1 = 0; S2 = 1; S3 = 1

Question 59

Consider the following two statements with respect to the matrices Am×n , Bn×m , Cn×n and  Dn×n 

Statement 1: tr(AB) = tr(BA) 
Statement 2: tr(CD) = tr(DC) 

where tr() represents the trace of a matrix. Which one of the following holds?

  • Statement 1 is correct and Statement 2 is wrong. 

  • Statement 1 is wrong and Statement 2 is correct.

  • Both Statement 1 and Statement 2 are correct. 

  • Both Statement 1 and Statement 2 are wrong.

Question 60

What is printed by the following ANSI C program? 

#include<stdio.h> 
int main(int argc, char *argv[]) 
{ 
   int x = 1, z[2] = {10, 11}; 
   int *p = NULL; 
   p = &x; 
   *p = 10; 
   p = &z[1]; 
   *(&z[0] + 1) += 3; 
   printf("%d, %d, %d\n", x, z[0], z[1]); 
   return 0; 
}
  • 1, 10, 11 

  • 1, 10, 14 

  • 10, 14, 11

  • 10, 10, 14 

There are 65 questions to complete.

Last Updated :
Take a part in the ongoing discussion