GATE 2021 (Session 2) Computer Science and Information Technology (CS) Questions with Solutions

GATE 2021 (Session 2)

64 questions

MCQ 33 · MSQ 13 · NAT 181-mark 29 · 2-mark 35

Questions 16–20 of 64

Q17Transport Layer Protocol1 markMCQ−0.33 if wrong
Consider the three-way handshake mechanism followed during TCP connection establishment between hosts P and Q. Let X and Y be two random 32-bit starting sequence numbers chosen by P and Q respectively. Suppose P sends a TCP connection request message to Q with a TCP segment having SYN bit =1, SEQ number =X, and ACK bit =0. Suppose Q accepts the connection request. Which one of the following choices represents the information present in the TCP segment header that is sent by Q to P?

Q18Array1 markMCQ−0.33 if wrong
What is the worst-case number of arithmetic operations performed by recursive binary search on a sorted array of size n?

Q19Regular Language1 markMCQ−0.33 if wrong
Let L⊆{0,1}∗L \subseteq \{0,1\}^* be an arbitrary regular language accepted by a minimal DFA with k states. Which one of the following languages must necessarily be accepted by a minimal DFA with k states?

Q20Array and Pointer1 markMCQ−0.33 if wrong
Consider the following ANSI C program.
 #include <stdio.h>
int main( ) 
{
    int arr[4][5];
    int  i, j;
    for (i=0; i < 4; i++) 
  {
        for (j=0; j < 5; j++) 
        {
            arr[i][j] = 10 * i + j;
        }
    }
    printf("%d", *(arr[1]+9));
    return 0;
}
What is the output of the above program?

Q21Functions1 markMSQ
Consider the following sets, where n≥2n\geq 2:

S1: Set of all nxn matrices with entries from the set {a,b,c}\{a, b, c\}
S2: Set of all functions from the set{0,1,2,...,n2−1}\{0,1,2,...,n^2-1\} to the set {0,1,2}\{0, 1, 2 \}

Which of the following choice(s) is/are correct?

One or more options are correct.