HomeSubjectsUniversityBlogAbout

Application Layer

Topic in Computer Networks & Cloud Computing

210 total MCQsShowing 30 with explanations10 Easy10 Medium10 Hard

About This Topic

The application layer is the top layer of the network stack, where protocols such as HTTP, DNS and SMTP provide services directly to user programs. Expect questions on DNS resolution, record types like A, AAAA, CNAME, MX and NS, and its default port 53. Web topics include HTTP methods and status codes, the Host header, persistent connections, cookies, HTTP/2 multiplexing and HTTPS. Email items cover SMTP for sending versus POP3 and IMAP for retrieval, while file transfer questions compare FTP active and passive modes with SFTP. Client-server versus peer-to-peer models, DHCP, and full-duplex WebSocket connections also appear.

Below are 30 practice questions from a pool of 210 Application Layer MCQs, one of 10 topics in Computer Networks & Cloud Computing. Each shows the correct answer with an explanation; when you are ready, take a timed quiz to test recall under exam conditions.

Practice Questions

Each question below shows the correct answer with a full explanation. Use these to build conceptual understanding before attempting a timed quiz.

Application LayerEasy

Q1. What is Telnet used for?

  1. A.Remote login✓ Correct
  2. B.Email sending
  3. C.Web browsing
  4. D.File transfer

Explanation

Telnet is used for remote login to access and manage network devices. However, it transmits data in plain text and has been largely replaced by SSH.

Report an error in this question

Application LayerEasy

Q2. What does DNS stand for?

  1. A.Digital Network Standard
  2. B.Data Network Service
  3. C.Domain Name System✓ Correct
  4. D.Dynamic Name Server

Explanation

DNS stands for Domain Name System. It translates human-readable domain names (like www.example.com) into IP addresses.

Report an error in this question

Application LayerEasy

Q3. Which protocol is used to retrieve emails from a mail server while keeping them on the server?

  1. A.SMTP
  2. B.IMAP✓ Correct
  3. C.POP3
  4. D.FTP

Explanation

IMAP (Internet Message Access Protocol) allows users to access emails on the server without downloading them, keeping them synchronized across multiple devices.

Report an error in this question

Application LayerEasy

Q4. Which port does SSH use?

  1. A.25
  2. B.21
  3. C.22✓ Correct
  4. D.23

Explanation

SSH (Secure Shell) uses port 22. It provides encrypted remote access to network devices and servers.

Report an error in this question

Application LayerEasy

Q5. What does URL stand for?

  1. A.Universal Reference Locator
  2. B.Universal Resource Locator
  3. C.Uniform Resource Locator✓ Correct
  4. D.Unified Resource Link

Explanation

URL stands for Uniform Resource Locator. It specifies the address of a resource on the Internet, including the protocol, domain, and path.

Report an error in this question

Application LayerEasy

Q6. Which protocol does a web browser use to access websites?

  1. A.FTP protocol
  2. B.SMTP protocol
  3. C.Telnet protocol
  4. D.HTTP/HTTPS✓ Correct

Explanation

Web browsers primarily use HTTP or HTTPS to request and receive web pages from web servers.

Report an error in this question

Application LayerEasy

Q7. What port does FTP use for control connection?

  1. A.23
  2. B.21✓ Correct
  3. C.22
  4. D.20

Explanation

FTP uses port 21 for the control connection (commands and responses) and port 20 for the data connection.

Report an error in this question

Application LayerEasy

Q8. Which protocol is used to send emails?

  1. A.FTP
  2. B.SMTP✓ Correct
  3. C.IMAP
  4. D.POP3

Explanation

SMTP (Simple Mail Transfer Protocol) is used to send emails from a client to a server or between mail servers.

Report an error in this question

Application LayerEasy

Q9. What is HTTP?

  1. A.A routing protocol for networks
  2. B.An email delivery protocol
  3. C.A file transfer protocol only
  4. D.A protocol for transferring web pages✓ Correct

Explanation

HTTP (HyperText Transfer Protocol) is the foundation of data communication on the World Wide Web, used for transferring web pages and resources.

Report an error in this question

Application LayerMedium

Q10. What port does SMTP use?

  1. A.110
  2. B.21
  3. C.25✓ Correct
  4. D.80

Explanation

SMTP uses port 25 for communication between mail servers. Port 587 is used for mail submission from clients.

Report an error in this question

Application LayerHard

Q11. What is a RESTful API?

  1. A.An API that only supports GET requests
  2. B.An API using HTTP methods for stateless access✓ Correct
  3. C.An API that only works during off-peak hours
  4. D.An API built on SOAP protocol framework

Explanation

A RESTful API follows REST (Representational State Transfer) principles, using standard HTTP methods (GET, POST, PUT, DELETE) for stateless, resource-based client-server interactions.

Report an error in this question

Application LayerMedium

Q12. What is the difference between FTP active and passive modes?

  1. A.Active mode uses TCP; passive mode uses UDP for transfer
  2. B.Active mode is encrypted; passive mode is not encrypted
  3. C.There is no functional difference between the two modes
  4. D.In active mode server initiates data; in passive mode client does✓ Correct

Explanation

In active FTP, the server connects back to the client for data transfer. In passive FTP, the client initiates both control and data connections, which works better with firewalls.

Report an error in this question

Application LayerMedium

Q13. What is a MIME type used for in email?

  1. A.Filtering out spam messages
  2. B.Routing emails between servers
  3. C.Defining the content type format✓ Correct
  4. D.Encrypting email messages

Explanation

MIME (Multipurpose Internet Mail Extensions) types describe the format of email content, enabling emails to contain multimedia content like images, audio, and attachments.

Report an error in this question

Application LayerHard

Q14. What is the key improvement in HTTP/2 over HTTP/1.1?

  1. A.It uses UDP instead of TCP for speed
  2. B.It removes all encryption and TLS support
  3. C.It uses a completely different port number
  4. D.It multiplexes requests over a single connection✓ Correct

Explanation

HTTP/2 introduces binary framing and multiplexing, allowing multiple requests and responses to be interleaved over a single TCP connection, eliminating head-of-line blocking at the application layer.

Report an error in this question

Application LayerHard

Q15. What is the purpose of DNSSEC?

  1. A.To speed up DNS query resolution time
  2. B.To authenticate and verify DNS responses✓ Correct
  3. C.To encrypt DNS queries for user privacy
  4. D.To replace DNS with a new modern protocol

Explanation

DNSSEC (DNS Security Extensions) adds digital signatures to DNS responses, enabling clients to verify the authenticity and integrity of DNS data, preventing cache poisoning attacks.

Report an error in this question

Application LayerEasy

Q16. What is the role of a DNS resolver?

  1. A.Encrypting data for transfer
  2. B.Sending emails between servers
  3. C.Hosting websites on servers
  4. D.Translating domain names to IPs✓ Correct

Explanation

A DNS resolver receives queries from clients and recursively queries DNS servers to translate domain names into IP addresses.

Report an error in this question

Application LayerMedium

Q17. What HTTP status code indicates 'Not Found'?

  1. A.403
  2. B.200
  3. C.301
  4. D.404✓ Correct

Explanation

HTTP 404 means the requested resource was not found on the server. 200 is OK, 301 is Moved Permanently, and 403 is Forbidden.

Report an error in this question

Application LayerHard

Q18. What is DNS-over-HTTPS (DoH)?

  1. A.A new DNS record type for websites
  2. B.A faster version of DNS using caching
  3. C.A protocol encapsulating DNS within HTTPS✓ Correct
  4. D.A way to host DNS on web servers only

Explanation

DNS-over-HTTPS sends DNS queries and responses over HTTPS, encrypting them to prevent eavesdropping and manipulation by middleboxes, enhancing user privacy.

Report an error in this question

Application LayerHard

Q19. In HTTP, what is the purpose of the ETag header?

  1. A.Session management cookies
  2. B.Resource versioning for caching✓ Correct
  3. C.User authentication tokens
  4. D.Content encoding indicators

Explanation

ETag is a validator that identifies a specific version of a resource. Clients can use it with If-None-Match to check if a cached resource is still valid, reducing bandwidth.

Report an error in this question

Application LayerMedium

Q20. What is the difference between HTTP/1.1 persistent and non-persistent connections?

  1. A.Persistent connections use UDP instead of TCP
  2. B.Persistent keeps TCP open for multiple requests; non-persistent does not✓ Correct
  3. C.There is no difference between them at all
  4. D.Non-persistent connections are faster than persistent ones

Explanation

Persistent connections (default in HTTP/1.1) keep the TCP connection open for multiple requests, reducing connection setup overhead. Non-persistent opens and closes a connection for each request.

Report an error in this question

Application LayerMedium

Q21. What is the purpose of DNS caching?

  1. A.To create backup DNS server entries
  2. B.To block malicious domain name requests
  3. C.To encrypt DNS queries for privacy
  4. D.To store resolved names for faster lookups✓ Correct

Explanation

DNS caching stores recently resolved name-to-address mappings locally, reducing query time and DNS server load for subsequent requests for the same domain.

Report an error in this question

Application LayerHard

Q22. In DNS, what is a recursive query?

  1. A.A query where the server fully resolves the name✓ Correct
  2. B.A query that only checks local cache entries
  3. C.A query that returns only partial results
  4. D.A query that bypasses all DNS caches

Explanation

In a recursive query, the DNS server takes full responsibility for resolving the domain name. It queries other DNS servers as needed and returns the final answer to the client.

Report an error in this question

Application LayerMedium

Q23. In HTTP, what is the difference between GET and POST methods?

  1. A.GET is more secure than POST method
  2. B.GET retrieves data via URL; POST sends data in body✓ Correct
  3. C.POST is always faster than GET requests
  4. D.They are identical in every respect

Explanation

GET is used to retrieve data and parameters are visible in the URL. POST submits data in the request body, making it more suitable for sensitive data and large payloads.

Report an error in this question

Application LayerMedium

Q24. What type of DNS record maps a domain name to an IPv4 address?

  1. A.AAAA record
  2. B.A record✓ Correct
  3. C.MX record
  4. D.CNAME record

Explanation

An A (Address) record maps a domain name to an IPv4 address. AAAA records map to IPv6, MX records point to mail servers, and CNAME records create aliases.

Report an error in this question

Application LayerHard

Q25. What is DNS amplification attack?

  1. A.Modifying DNS responses to redirect users
  2. B.Using open resolvers to flood a target with traffic✓ Correct
  3. C.Blocking all DNS queries on the network
  4. D.Stealing DNS records from name servers

Explanation

DNS amplification is a DDoS attack where an attacker sends DNS queries with a spoofed source IP (victim's IP) to open resolvers. The large DNS responses flood the victim.

Report an error in this question

Application LayerMedium

Q26. Which protocol is used for secure file transfer?

  1. A.Telnet
  2. B.HTTP
  3. C.SFTP✓ Correct
  4. D.FTP

Explanation

SFTP (SSH File Transfer Protocol) provides secure file transfer by running over SSH, encrypting both commands and data.

Report an error in this question

Application LayerMedium

Q27. What is SNMP used for?

  1. A.Transferring files
  2. B.Browsing web pages
  3. C.Sending emails to users
  4. D.Managing network devices✓ Correct

Explanation

SNMP (Simple Network Management Protocol) is used to manage and monitor network devices such as routers, switches, servers, and printers.

Report an error in this question

Application LayerHard

Q28. What is the function of a reverse proxy?

  1. A.To block all incoming network traffic
  2. B.To hide the client identity from servers
  3. C.To forward requests to backend servers✓ Correct
  4. D.To replace DNS resolution entirely

Explanation

A reverse proxy sits in front of backend servers, distributing incoming requests among them. It provides load balancing, SSL termination, caching, and hides backend server details.

Report an error in this question

Application LayerHard

Q29. What is WebSocket and how does it differ from HTTP?

  1. A.WebSocket is only designed for file transfers
  2. B.WebSocket provides full-duplex persistent communication✓ Correct
  3. C.WebSocket uses UDP instead of TCP for transport
  4. D.WebSocket is a faster version of the HTTP protocol

Explanation

WebSocket establishes a persistent, full-duplex communication channel over a single TCP connection, allowing both server and client to send data independently, unlike HTTP's half-duplex request-response pattern.

Report an error in this question

Application LayerHard

Q30. What is the purpose of a CDN (Content Delivery Network)?

  1. A.To encrypt emails during transit
  2. B.To replace web servers entirely
  3. C.To provide DNS resolution services
  4. D.To distribute content globally for speed✓ Correct

Explanation

A CDN places copies of content on servers distributed globally, serving users from the nearest server to reduce latency, improve load times, and handle traffic spikes.

Report an error in this question

Ready to test yourself on Application Layer?

Take a timed quiz drawn from 210+ questions on this topic. No signup required — your progress saves in your browser.

Start Application Layer Quiz