Test: Socket Programming


10 Questions MCQ Test Computer Networks | Test: Socket Programming


Description
Attempt Test: Socket Programming | 10 questions in 10 minutes | Mock test for Computer Science Engineering (CSE) preparation | Free important questions MCQ to study Computer Networks for Computer Science Engineering (CSE) Exam | Download free PDF with solutions
QUESTION: 1

Which methods are commonly used in ServerSocket class?

Solution:
QUESTION: 2

Which constructor of Datagram Socket class is used to create a datagram socket and binds it with the given Port Number?

Solution:

Answer: b
Explanation: Datagram Socket (int port, Int Address address) is use data create a datagram socket.

QUESTION: 3

The client in socket programming must know which information?

Solution:

Answer: c
Explanation: The client in socket programming must know IP address of Server.

QUESTION: 4

The URL Connection class can be used to read and write data to the specified resource referred by the URL

Solution:

Answer: a
Explanation: The URL Connection class can be used to read and write data to the specified resource referred by the URL.

QUESTION: 5

Datagram is basically an information but there is no guarantee of its content, arrival or arrival time.

Solution:

Answer: a
Explanation: Datagram is basically an information but there is no guarantee of its content, arrival or arrival time.

QUESTION: 6

TCP, FTP, Telnet, SMTP, POP etc. are examples of?

Solution:

Answer: c
Explanation: TCP, FTP, Telnet, SMTP, POP etc. are examples of Protocol.

QUESTION: 7

What does the java.net.InetAddress class represent?

Solution:

Answer: b
Explanation: The java.net.InetAddress class represent IP Address.

QUESTION: 8

The flush () method of Print Stream class flushes any un cleared buffers in memory

Solution:

Answer: a
Explanation: The flush () method of Print Stream class flushes any un cleared buffers in memory.

QUESTION: 9

Which classes are used for connection-less socket programming?

Solution:

Answer: c
Explanation: Datagram Socket, Datagram Packet are used for connection-less socket programming.

QUESTION: 10

In Int Address class which method returns the host name of the IP Address?

Solution:

Answer: a
Explanation: In Int Address class public String get Hostname() method returns the host name of the IP Address.

Use Code STAYHOME200 and get INR 200 additional OFF
Use Coupon Code