GATE | Quiz for Sudo GATE 2021 | Question 37
Which of the following option(s) is/are true?
Note – This question is multiple select questions (MSQ).
(A) socket() creates a new socket of a certain socket type, identified by an integer number, and allocates system resources to it.
(B) bind() is typically used on the client side, and associates a socket with a socket address structure, i.e. a specified local port number and IP address.
(C) listen() is used on the server side, and causes a bound TCP socket to enter listening state.
(D) connect() is used on the client side, and assigns a free local port number to a socket.
Answer: (A) (C) (D)
Explanation: bind() is typically used on the server side, and associates a socket with a socket address structure, i.e. a specified local port number and IP address.
Only option (B) is false.
Quiz of this Question
Last Updated :
17 Dec, 2020
Like Article
Save Article
Share your thoughts in the comments
Please Login to comment...