CPA Web Development & APIs 1 — Questions and Answers
Question 1: What does HTTP stand for?
- HyperText Transfer Protocol (Correct answer)
- HyperText Transmission Process
- High Transfer Text Protocol
- HyperText Transport Procedure
Correct answer: HyperText Transfer Protocol
HTTP stands for HyperText Transfer Protocol, the foundational protocol used for transmitting web pages over the internet.
Question 2: Which HTTP method is used to retrieve data from a server without modifying it?
- POST
- PUT
- GET (Correct answer)
- DELETE
Correct answer: GET
GET is the HTTP method used to request and retrieve data from a server; it is idempotent and does not modify server state.
Question 3: What is the purpose of a URL query string?
- To specify the server's port number
- To pass additional parameters to a web resource (Correct answer)
- To identify the protocol being used
- To define the path to a file on the server
Correct answer: To pass additional parameters to a web resource
A URL query string, appended after a '?' character, passes key-value pairs as additional parameters to the web resource being requested.
Question 4: Which HTTP status code indicates a successful request?
- 301
- 404
- 500
- 200 (Correct answer)
Correct answer: 200
HTTP status code 200 (OK) indicates that the request was successful and the server returned the requested resource.
Question 5: What does REST stand for in the context of web APIs?
- Remote Execution Standard Template
- Representational State Transfer (Correct answer)
- Request-Encoded Server Technology
- Resource Endpoint Schema Terminology
Correct answer: Representational State Transfer
REST stands for Representational State Transfer, an architectural style for distributed hypermedia systems that uses standard HTTP methods.
Question 6: Which protocol is used to secure HTTP communications through encryption?
- FTP
- SMTP
- HTTPS (Correct answer)
- SSH
Correct answer: HTTPS
HTTPS (HTTP Secure) uses TLS/SSL encryption to secure data transmitted between a web browser and a server.
Question 7: What is the Document Object Model (DOM) in web development?
- A database structure for storing web content
- A programming interface representing the HTML document as a tree of objects (Correct answer)
- A server-side rendering framework
- A method for optimizing web page loading speed
Correct answer: A programming interface representing the HTML document as a tree of objects
The DOM is a programming interface that represents an HTML or XML document as a tree structure, allowing scripts to dynamically access and update content, structure, and style.