IAE Academy

GATE 2026 CS1 Q.18: solution and answer

GATE 2026 · CS1Q.18 · 1 mark · MCQ

With respect to a TCP connection between a client and a server, which one of the following statements is true?

  1. (A)

    The client and server use a two-way handshake mechanism before the start of data transmission

  2. (B)

    The server cannot initiate closing of the connection before the client initiates closing of the connection

  3. (C)

    The TCP connection is half-duplex

  4. (D)

    The client and server can initiate closing of the connection at the same time

See the question in the paper

Answer and solution

ANSWER

The correct option is (D): the client and server can initiate closing of the connection at the same time (simultaneous close).

Official answer: DSource: Official answer key, GATE 2026 CS1 (IIT Guwahati)

  1. Option (A): TCP opens a connection with a three-way handshake (SYN, SYN-ACK, ACK), not a two-way one. False.

  2. Option (C): a TCP connection carries data in both directions at the same time, so it is full-duplex, not half-duplex. False.

  3. Option (B): closing is symmetric. Each direction is closed independently by its own FIN, and either side may send the first FIN, the server included. So the server can start closing before the client does. False.

  4. Option (D): if both sides send a FIN at about the same time, each moves from ESTABLISHED to FIN_WAIT_1. Each then receives the other's FIN before its own FIN is acknowledged, and moves to CLOSING. After the ACKs arrive, each moves to TIME_WAIT. This is the simultaneous close, and TCP defines it. True.

  5. Hence only (D) is a true statement.

KEY IDEA

TCP opens with a three-way handshake, is full-duplex, and closes each direction independently with its own FIN. Either side may send the first FIN, and both may send one at once (simultaneous close, via the CLOSING state).

WATCH OUT FOR

Thinking the client must always close first because it opened the connection. Close is not tied to who opened. Another slip is mixing up the three-way open with the four-segment close.

From the GATE 2026 CS1 paper. Every question of this paper · Download the full paper · All 12 TCP questions, with notes

More TCP questions