---
title: "Differences between TCP and UDP"
subject: "Computer Networks and Security"
chapter: 5
key: "semester_7/computer_networks_and_security:tcp-vs-udp"
source: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/tcp-vs-udp
site: BCT Engineering
---

# Differences between TCP and UDP

Computer Networks and Security · Chapter 5: Transport Layer

- Asked in: 2073 Chaitra; 2071 Shrawan, 3 marks; 2071 Chaitra, 5 marks (asked 3 times)
- Video: [Difference between TCP and UDP | Networking](https://www.youtube.com/watch?v=4ksqUnW7eak) — Learn Coding
- Answer checked by Claude Opus 5.5 (high effort) on 2026-10-14
- Page: https://www.bctengineer.com/q/semester_7/computer_networks_and_security/tcp-vs-udp
- Whole chapter: https://www.bctengineer.com/md/semester_7/computer_networks_and_security/chapter-5

## Question

Distinguish between TCP and UDP.

## Answer

TCP (Transmission Control Protocol) is a connection-oriented, reliable transport protocol. UDP (User Datagram Protocol) is a connectionless, unreliable, lightweight transport protocol.

| Point | TCP | UDP |
|---|---|---|
| Connection | Connection-oriented (3-way handshake) | Connectionless |
| Reliability | Reliable: ACK, retransmission, sequencing | Unreliable, best effort |
| Data unit | Byte stream, segments | Message (datagram) with boundaries kept |
| Ordering | Ordered delivery, duplicates removed | No ordering |
| Flow / congestion control | Yes (window, slow start) | No |
| Header size | 20 to 60 bytes | 8 bytes |
| Speed / overhead | Slower, higher overhead | Faster, low overhead |
| Transfer | Point to point only | Supports broadcast and multicast |
| Applications | HTTP, FTP, SMTP, SSH, POP3 | DNS, DHCP, SNMP, VoIP, video streaming, TFTP |

TCP is chosen when correctness matters; UDP when speed and low delay matter more than occasional loss.

## Check yourself

The answer's key points as multiple-choice questions, with the correct option and why.

1. Which pair is correct?
   A. Both connection-oriented
   B. TCP connection-oriented and reliable, UDP connectionless and best effort
   C. TCP connectionless, UDP reliable
   D. Both reliable
   Answer: B. TCP uses handshake, ACKs and retransmission; UDP does not. (Key point: Connection and reliability)

2. What are the header sizes of TCP and UDP?
   A. Both 8 bytes
   B. Both 20 bytes
   C. TCP 8 bytes, UDP 20-60 bytes
   D. TCP 20-60 bytes, UDP 8 bytes
   Answer: D. UDP's small header gives low overhead. (Key point: Header size)

3. Which supports broadcast and multicast?
   A. Both
   B. UDP
   C. TCP only
   D. Neither
   Answer: B. TCP is point to point only; UDP supports broadcast/multicast. (Key point: Broadcast and multicast)

4. Which application suits UDP?
   A. VoIP or DNS
   B. SSH
   C. FTP
   D. SMTP
   Answer: A. UDP is used where speed and low delay matter more than occasional loss. (Key point: Choosing a protocol)

5. How does TCP treat data?
   A. Byte stream split into segments
   B. Fixed-size cells
   C. Message datagrams with boundaries
   D. Frames only
   Answer: A. TCP is a byte stream; UDP preserves message boundaries. (Key point: Data unit)
