NEOCODE

UDP Protocol MCQs

UDP - Header Format

1. How many bytes is the UDP header?

Correct Answer: b) 8 bytes

Explanation:
The UDP header consists of 4 fields (Source Port, Destination Port, Length, and Checksum), each 2 bytes long, totaling 8 bytes.

2. Which of the following is a characteristic of UDP?

Correct Answer: c) Low overhead

Explanation:
UDP has low overhead because it doesn't establish connections, doesn't provide reliability, flow control, or congestion control mechanisms like TCP does.

3. Which field in the UDP header ensures data integrity?

Correct Answer: d) Checksum

Explanation:
The Checksum field is used to detect errors in the UDP header and data. However, note that checksum is optional in IPv4 but mandatory in IPv6.

4. UDP is preferred over TCP for:

Correct Answer: b) Live video streaming

Explanation:
UDP is preferred for live video streaming because it provides lower latency. Missing packets are less critical than the delay caused by TCP's retransmission mechanism.

5. What is the maximum size of a UDP datagram?

Correct Answer: c) 65,535 bytes

Explanation:
The Length field in UDP is 16 bits, allowing a maximum theoretical size of 65,535 bytes (including 8-byte header). However, practical limits are often smaller due to IP fragmentation.

UDP Applications and Characteristics

6. Which protocol uses UDP for fast communication?

Correct Answer: c) DNS

Explanation:
DNS primarily uses UDP on port 53 for standard queries because of its low overhead. TCP is only used for zone transfers or when response data exceeds 512 bytes.

7. Does UDP perform error recovery?

Correct Answer: b) No, it discards corrupted packets

Explanation:
UDP detects errors using checksum but doesn't recover from them. Corrupted packets are simply discarded without any notification to sender or receiver.

8. Which field in the UDP header defines the application process?

Correct Answer: d) Destination Port

Explanation:
The Destination Port identifies the specific application process on the receiving host that should handle the datagram.

9. Why is UDP used in real-time applications?

Correct Answer: b) Because it has low latency and no retransmission delays

Explanation:
Real-time applications like VoIP and video streaming prefer UDP because occasional packet loss is preferable to the delays caused by TCP's retransmission and ordering mechanisms.

10. Which of the following does UDP NOT provide?

Correct Answer: c) Flow control

Explanation:
UDP provides multiplexing/demultiplexing via port numbers, optional checksum for error detection, and port addressing. However, it doesn't implement any flow control mechanism.