1. Which of the following is a valid React hook used for managing state?
A. useEffect
B. useState
C. useContext
D. All of the above
Answer: d) All of the above
Rationale: useState, useEffect, and useContext are all valid React hooks used for
managing state, side effects, and context, respectively.
2. Which of the following HTTP status codes indicates a successful request?
A. 404
B. 500
C. 200
D. 301
Answer: c) 200
Rationale: HTTP status code 200 indicates a successful request and that the server has
successfully processed the request.
,3. Which of the following is used for managing dependencies in Node.js projects?
A. npm
B. Git
C. SQL
D. MongoDB
Answer: a) npm
Rationale: npm (Node Package Manager) is used to manage libraries and
dependencies in Node.js projects.
4. Which of the following is a feature of a RESTful API?
A. Stateless communication
B. Requires WebSockets
C. Requires real-time data
D. Uses XML exclusively
Answer: a) Stateless communication
Rationale: RESTful APIs follow the principle of stateless communication, meaning
each request is independent and must contain all the information needed.
, 5. Which of the following is used to define routes in an Express.js application?
A. app.set()
B. app.route()
C. app.listen()
D. app.get()
Answer: b) app.route()
Rationale: app.route() is used in Express.js to define and chain multiple route handlers
for a specific path.
6. Which of the following tools is used for task automation in frontend development?
A. Webpack
B. Node.js
C. Git
D. Flask
Answer: a) Webpack
Rationale: Webpack is a module bundler and task automation tool commonly used to
bundle JavaScript, CSS, and other assets in frontend development.
7. Which of the following tools is used to manage state in React applications?
A. useEffect
B. useState
C. useContext
D. All of the above
Answer: d) All of the above
Rationale: useState, useEffect, and useContext are all valid React hooks used for
managing state, side effects, and context, respectively.
2. Which of the following HTTP status codes indicates a successful request?
A. 404
B. 500
C. 200
D. 301
Answer: c) 200
Rationale: HTTP status code 200 indicates a successful request and that the server has
successfully processed the request.
,3. Which of the following is used for managing dependencies in Node.js projects?
A. npm
B. Git
C. SQL
D. MongoDB
Answer: a) npm
Rationale: npm (Node Package Manager) is used to manage libraries and
dependencies in Node.js projects.
4. Which of the following is a feature of a RESTful API?
A. Stateless communication
B. Requires WebSockets
C. Requires real-time data
D. Uses XML exclusively
Answer: a) Stateless communication
Rationale: RESTful APIs follow the principle of stateless communication, meaning
each request is independent and must contain all the information needed.
, 5. Which of the following is used to define routes in an Express.js application?
A. app.set()
B. app.route()
C. app.listen()
D. app.get()
Answer: b) app.route()
Rationale: app.route() is used in Express.js to define and chain multiple route handlers
for a specific path.
6. Which of the following tools is used for task automation in frontend development?
A. Webpack
B. Node.js
C. Git
D. Flask
Answer: a) Webpack
Rationale: Webpack is a module bundler and task automation tool commonly used to
bundle JavaScript, CSS, and other assets in frontend development.
7. Which of the following tools is used to manage state in React applications?