GATE CSE 2022 — Previous Year Questions

Real questions from the 2022 paper with options and answers. Take a timed test →

WhatsApp

23 questions

  1. Q1 · Computer Science & IT

    Which one of the following statements is TRUE for all positive functions ( )f n ?
    • A.2 2( ) ( ( ) ),f n f n when ( )f n is a polynomial
    • B.2 2( ) ( ( ) )f n o f n
    • C.2 2( ) ( ( ) ),f n O f n when ( )f n is an exponential function
    • D.2 2( ) ( ( ) )f n f n
    Show answer / उत्तर देखें

    Answer: A 2 2( ) ( ( ) ),f n f n when ( )f n is a polynomial

    Official GATE 2022 answer key: (A).
  2. Q2 · Computer Science & IT

    In a relational data model, which one of the following statements is TRUE?
    • A.A relation with only two attributes is always in BCNF.
    • B.If all attributes of a relation are prime attributes, then the relation is in BCNF.
    • C.Every relation has at least one non-prime attribute.
    • D.BCNF decompositions preserve functional dependencies.
    Show answer / उत्तर देखें

    Answer: A A relation with only two attributes is always in BCNF.

    Official GATE 2022 answer key: (A).
  3. Q3 · Computer Science & IT

    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 (1)O space?
    • A.The best algorithm for the problem takes ( )n time in the worst case.
    • B.The best algorithm for the problem takes ( log )n n time in the worst case.
    • C.The best algorithm for the problem takes 2( )n time in the worst case.
    • D.It is not possible to reverse a singly linked list in (1)O space.
    Show answer / उत्तर देखें

    Answer: A The best algorithm for the problem takes ( )n time in the worst case.

    Official GATE 2022 answer key: (A).
  4. Q4 · Computer Science & IT

    Suppose we are given n keys, m hash table slots, and two simple uniform hash functions 1h and 2h . Further suppose our hashing scheme uses 1h for the odd keys and 2h for the even keys. What is the expected number of keys in a slot?
    • A.m n
    • B.n m
    • C.2n m
    • D.2 n m
    Show answer / उत्तर देखें

    Answer: B n m

    Official GATE 2022 answer key: (B).
  5. Q5 · Computer Science & IT

    Which one of the following facilitates transfer of bulk data from hard disk to main memory with the highest throughput?
    • A.DMA based I/O transfer
    • B.Interrupt driven I/O transfer
    • C.Polling based I/O transfer
    • D.Programmed I/O transfer
    Show answer / उत्तर देखें

    Answer: A DMA based I/O transfer

    Official GATE 2022 answer key: (A).
  6. Q6 · Computer Science & IT

    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?
    • A.R1 = 1011 and R2 = 1110
    • B.R1 = 1100 and R2 = 1010
    • C.R1 = 0011 and R2 = 0100
    • D.R1 = 1001 and R2 = 1111
    Show answer / उत्तर देखें

    Answer: B R1 = 1100 and R2 = 1010

    Official GATE 2022 answer key: (B).
  7. Q7 · Computer Science & IT

    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. T1 T2 T3 while(true){ wait(S3); print(“C”); signal(S2); } while(true){ wait(S1); print(“B”); signal(S3); } while(true){ wait(S2); print(“A”); signal(S1); } Which initialization of the semaphores would print the sequence BCABCABCA….?
    • A.S1 = 1; S2 = 1; S3 = 1
    • B.S1 = 1; S2 = 1; S3 = 0
    • C.S1 = 1; S2 = 0; S3 = 0
    • D.S1 = 0; S2 = 1; S3 = 1
    Show answer / उत्तर देखें

    Answer: C S1 = 1; S2 = 0; S3 = 0

    Official GATE 2022 answer key: (C).
  8. Q8 · Computer Science & IT

    Consider the following two statements with respect to the matrices m nA  , n mB  , n nC  and .n nD  where tr() represents the trace of a matrix. Which one of the following holds?
    • A.Statement 1 is correct and Statement 2 is wrong.
    • B.Statement 1 is wrong and Statement 2 is correct.
    • C.Both Statement 1 and Statement 2 are correct.
    • D.Both Statement 1 and Statement 2 are wrong.
    Show answer / उत्तर देखें

    Answer: C Both Statement 1 and Statement 2 are correct.

    Official GATE 2022 answer key: (C).
  9. Q9 · Computer Science & IT

    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; }
    • A.1, 10, 11
    • B.1, 10, 14
    • C.10, 14, 11
    • D.10, 10, 14
    Show answer / उत्तर देखें

    Answer: D 10, 10, 14

    Official GATE 2022 answer key: (D).
  10. Q10 · Computer Science & IT

    Which one of the following is the closed form for the generating function of the sequence 0{ }n na  defined below? 1, is odd 1, otherwise n n na  
    • A.    2 22 1 1 11 x x xx   
    • B.  2 22 (3 ) 1 11 x x xx   
    • C.  22 2 1 11 x xx  
    • D.2 2 1 (1 ) 1 x x x 
    Show answer / उत्तर देखें

    Answer: A     2 22 1 1 11 x x xx   

    Official GATE 2022 answer key: (A).
  11. Q11 · Computer Science & IT

    Consider a simple undirected unweighted graph with at least three vertices. If A is the adjacency matrix of the graph, then the number of 3-cycles in the graph is given by the trace of
    • A.3A
    • B.3A divided by 2
    • C.3A divided by 3
    • D.3A divided by 6
    Show answer / उत्तर देखें

    Answer: D 3A divided by 6

    Official GATE 2022 answer key: (D).
  12. Q12 · Computer Science & IT

    Let ( )iR z and ( )iW z denote read and write operations on a data element z by a transaction iT , respectively. Consider the schedule S with four transactions. S: 4 2 3 1 1 2 3 4( ) ( ) ( ) ( ) ( ) ( ) ( ) ( )R x R x R x R y W y W x W y R y Which one of the following serial schedules is conflict equivalent to S?
    • A.𝑇ଵ → 𝑇ଷ → 𝑇ସ → 𝑇ଶ
    • B.𝑇ଵ → 𝑇ସ → 𝑇ଷ → 𝑇ଶ
    • C.𝑇ସ → 𝑇ଵ → 𝑇ଷ → 𝑇ଶ
    • D.𝑇ଷ → 𝑇ଵ → 𝑇ସ → 𝑇ଶ
    Show answer / उत्तर देखें

    Answer: A 𝑇ଵ → 𝑇ଷ → 𝑇ସ → 𝑇ଶ

    Official GATE 2022 answer key: (A).
  13. Q13 · Computer Science & IT

    Consider three floating point numbers A, B and C stored in registers RA, RB and RC, respectively as per IEEE-754 single precision floating point format. The 32-bit content stored in these registers (in hexadecimal form) are as follows. RA= 0xC1400000 RB = 0x42100000 RC = 0x41400000 Which one of the following is FALSE?
    • A.0A C 
    • B.C A B 
    • C.3B C
    • D.( ) 0B C 
    Show answer / उत्तर देखें

    Answer: B C A B 

    Official GATE 2022 answer key: (B).
  14. Q14 · Computer Science & IT

    Consider four processes P, Q, R, and S scheduled on a CPU as per round robin algorithm with a time quantum of 4 units. The processes arrive in the order P, Q, R, S, all at time t = 0. There is exactly one context switch from S to Q, exactly one context switch from R to Q, and exactly two context switches from Q to R. There is no context switch from S to P. Switching to a ready process after the termination of another process is also considered a context switch. Which one of the following is NOT possible as CPU burst time (in time units) of these processes?
    • A.P = 4, Q = 10, R = 6, S = 2
    • B.P = 2, Q = 9, R = 5, S = 1
    • C.P = 4, Q = 12, R = 5, S = 4
    • D.P = 3, Q = 7, R = 7, S = 3
    Show answer / उत्तर देखें

    Answer: D P = 3, Q = 7, R = 7, S = 3

    Official GATE 2022 answer key: (D).
  15. Q15 · Computer Science & IT

    What is printed by the following ANSI C program? #include<stdio.h> int main(int argc, char *argv[]) { int a[3][3][3] = {{1, 2, 3, 4, 5, 6, 7, 8, 9}, {10, 11, 12, 13, 14, 15, 16, 17, 18}, {19, 20, 21, 22, 23, 24, 25, 26, 27}}; int i = 0, j = 0, k = 0; for( i = 0; i < 3; i++ ){ for(k = 0; k < 3; k++ ) printf("%d ", a[i][j][k]); printf("\n"); } return 0; }
    • A.1 2 3 10 11 12 19 20 21
    • B.1 4 7 10 13 16 19 22 25
    • C.1 2 3 4 5 6 7 8 9
    • D.1 2 3 13 14 15 25 26 27
    Show answer / उत्तर देखें

    Answer: A 1 2 3 10 11 12 19 20 21

    Official GATE 2022 answer key: (A).
  16. Q16 · Computer Science & IT

    Consider solving the following system of simultaneous equations using LU decomposition. 1 2 3 1 2 3 1 2 3 2 4 3 7 2 5 7 x x x x x x x x x          where L and U are denoted as 11 21 22 31 32 33 0 0 0 L L L L L L L        , 11 12 13 22 23 330 0 0 U U U U U U U          Which one of the following is the correct combination of values for 32L , 33,U and 1 ?x
    • A.32 33 1 12, , 12L U x  
    • B.32 33 12, 2, 1L U x  
    • C.32 33 1 1 , 2, 02L U x  
    • D.32 33 1 1 1, , 02 2L U x  
    Show answer / उत्तर देखें

    Answer: D 32 33 1 1 1, , 02 2L U x  

    Official GATE 2022 answer key: (D).
  17. Q17 · General Aptitude

    The _________ is too high for it to be considered _________.
    • A.fair / fare
    • B.faer / fair
    • C.fare / fare
    • D.fare / fair Page 2 of 41
    Show answer / उत्तर देखें

    Answer: D fare / fair Page 2 of 41

    Official GATE 2022 answer key: (D).
  18. Q18 · General Aptitude

    A function y(x) is defined in the interval [0, 1] on the 𝑥-axis as 𝑦(𝑥) = ⎩ ⎪ ⎨ ⎪ ⎧ 2 if 0 ≤ 𝑥 < 1 3 3 if 1 3 ≤ 𝑥 < 3 4 1 if 3 4 ≤ 𝑥 ≤ 1 Which one of the following is the area under the curve for the interval [0, 1] on the 𝑥-axis?
    • A.5 6
    • B.6 5
    • C.13 6
    • D.6 13 Page 3 of 41
    Show answer / उत्तर देखें

    Answer: C 13 6

    Official GATE 2022 answer key: (C).
  19. Q19 · General Aptitude

    Let r be a root of the equation 𝑥ଶ + 2𝑥 + 6 = 0. Then the value of the expression (𝑟 + 2)(𝑟 + 3)(𝑟 + 4)(𝑟 + 5) is
    • A.51
    • B.−51
    • C.126
    • D.−126 Page 4 of 41
    Show answer / उत्तर देखें

    Answer: D −126 Page 4 of 41

    Official GATE 2022 answer key: (D).
  20. Q20 · General Aptitude

    Some people believe that “what gets measured, improves”. Some others believe that “what gets measured, gets gamed”. One possible reason for the difference in the beliefs is the work culture in organizations. In organizations with good work culture, metrics help improve outcomes. However, the same metrics are counterproductive in organizations with poor work culture. Which one of the following is the CORRECT logical inference based on the information in the above passage?
    • A.Metrics are useful in organizations with poor work culture
    • B.Metrics are useful in organizations with good work culture
    • C.Metrics are always counterproductive in organizations with good work culture
    • D.Metrics are never useful in organizations with good work culture Page 7 of 41
    Show answer / उत्तर देखें

    Answer: B Metrics are useful in organizations with good work culture

    Official GATE 2022 answer key: (B).
  21. Q21 · General Aptitude

    In a recently conducted national entrance test, boys constituted 65% of those who appeared for the test. Girls constituted the remaining candidates and they accounted for 60% of the qualified candidates. Which one of the following is the correct logical inference based on the information provided in the above passage?
    • A.Equal number of boys and girls qualified
    • B.Equal number of boys and girls appeared for the test
    • C.The number of boys who appeared for the test is less than the number of girls who appeared
    • D.The number of boys who qualified the test is less than the number of girls who qualified Page 8 of 41
    Show answer / उत्तर देखें

    Answer: D The number of boys who qualified the test is less than the number of girls who qualified Page 8 of 41

    Official GATE 2022 answer key: (D).
  22. Q22 · General Aptitude

    A box contains five balls of same size and shape. Three of them are green coloured balls and two of them are orange coloured balls. Balls are drawn from the box one at a time. If a green ball is drawn, it is not replaced. If an orange ball is drawn, it is replaced with another orange ball. First ball is drawn. What is the probability of getting an orange ball in the next draw?
    • A.1 2
    • B.8 25
    • C.19 50
    • D.23 50 Page 9 of 41
    Show answer / उत्तर देखें

    Answer: D 23 50 Page 9 of 41

    Official GATE 2022 answer key: (D).
  23. Q23 · General Aptitude

    The corners and mid-points of the sides of a triangle are named using the distinct letters P, Q, R, S, T and U, but not necessarily in the same order. Consider the following statements:  The line joining P and R is parallel to the line joining Q and S.  P is placed on the side opposite to the corner T.  S and U cannot be placed on the same side. Which one of the following statements is correct based on the above information?
    • A.P cannot be placed at a corner
    • B.S cannot be placed at a corner
    • C.U cannot be placed at a mid-point
    • D.R cannot be placed at a corner Page 10 of 41
    Show answer / उत्तर देखें

    Answer: B S cannot be placed at a corner

    Official GATE 2022 answer key: (B).