Have a question?
Message sent Close
time left:
:
:

Students Final Assessment

Submit quiz
Once you submit, you will no longer be able to change your answers. Are you sure you want to submit the quiz?
1.

A request updates only one field of an existing resource instead of replacing the entire object. Which HTTP method is most appropriate?

C. PATCH
D. DELETE
B. PUT
A. POST
2.

A landing page looks correct on desktop but breaks on mobile because elements overflow the screen. You need a solution that adapts layouts based on screen size without duplicating markup. What is the best approach?

D. Increase the viewport width
B. Use fixed pixel widths for all elements
A. Apply media queries with flexible units
C. Load a separate mobile HTML file
3.

Your API must clearly define how clients should interact with resources using standard conventions. What principle ensures this consistency?

A. Tight coupling
C. Hard-coded responses
B. Stateless communication
D. UI-driven logic
4.

A component re-renders unnecessarily whenever its parent updates, even though its data hasn’t changed. This is causing performance issues.
What is the most appropriate fix?

C. Replace the component with plain HTML
A. Move the component to a different file
B. Use memoization to prevent unnecessary renders
D. Convert it to a class-based component
5.

A user interface updates automatically when underlying data changes, without manually manipulating the DOM. What enables this behavior?

C. Static HTML
A. Template literals
B. Two-way data binding
D. Reactive rendering
6.

Your application state must be shared across multiple deeply nested components without passing props at every level. What is the best solution?

 

 

A. Global CSS variables
C. Direct DOM manipulation
D. Centralized state management
B. Browser localStorage
7.

You are building a real-time chat app. Why choose WebSockets over HTTP polling?

C. Better SEO
A. Easier authentication
D. Stronger encryption
B. Reduced latency and persistent connection
8.

A deployment pipeline automatically runs tests and blocks releases if any test fails.
What is the primary benefit?

 

C. Less documentation
D. Reduced production errors
A. Faster coding
B. Smaller repositories
9.

 A backend service must handle thousands of concurrent requests efficiently without blocking while waiting for database responses. Which design choice best supports this?

 

A. Synchronous request handling
B. Blocking I/O operations
C. Event-driven, non-blocking execution
D. Multi-threading per request
10.

You need to validate API endpoints automatically after every code change to ensure they still behave correctly. What is the best practice?

D. Logging requests only
B. Unit testing UI components
A. Manual browser testing
C. Automated API tests
11.

An endpoint is designed to fetch a list of users. Calling it multiple times with the same request should not change server data. Which HTTP method best fits this behavior?

 

 

A. POST
D. GET
C. PATCH
B. PUT
12.

A developer structures the app so that business logic, data handling, and presentation are clearly separated. What is the main benefit of this approach?

 

D. Automatic testing coverage
C. Smaller file sizes
A. Faster internet speed
B. Easier maintenance and scalability
13.

You need to create a responsive layout where items wrap automatically based on screen size. Which CSS solution is best?

 

 

C. Flexbox with flex-wrap
B. CSS Grid with fixed columns
A. Float layout
D. Inline-block elements
14.

React Rendering

Your React component re-renders unnecessarily when props don’t change. What should you use?

A.React.memo
B. useCallback
C. useEffect
D. useRef
15.

In an MVC application, where should business logic reside?

 

 

B. Controller
C. Model
D. Router
A. View
16.

You want to reduce the number of database queries made during repeated API requests for the same data. What strategy helps most?

 

 

A. Client-side validation
B. Server-side caching
C. Larger payloads
D. More endpoints
17.

An API returns different responses based on whether a requested resource exists or not. Which status code should be returned when the resource is missing?

 

 

A. 404
C. 200
B. 201
D. 500
18.

You want to release breaking API changes without affecting existing clients. What’s the best approach?

 

 

C. Change database schema
A.  Version the API (e.g. /v2)
D. Use query parameters
B. Remove old endpoints
19.

A database must handle complex joins and enforce strict data relationships between tables. Which choice best satisfies this requirement?

 

 

A. Key-value storage
D. In-memory cache
B. Document-based storage
C. Relational schema
20.

An application works on one machine but fails on another due to environment differences. What is the best way to ensure consistent behavior everywhere?

D. Hard-coded paths
B. Virtual machines only
A. Manual setup guides
C. Containerized environments
21.

Your app stores user profiles with varying fields that may change frequently over time. Which data storage approach is most flexible?

 

 

D. CSV files
A. Fixed-schema tables
C. Flat files
B. Document-oriented storage
22.

 A button on a web page should display a confirmation message only after the user clicks it, without reloading the page. Which approach best achieves this?

 

 

B. Server-side rendering
D. HTML form submission
A. Inline CSS styling
C. Client-side event handling
23.

A developer exposes sensitive credentials directly in the frontend bundle, which becomes visible in the browser. What is the correct preventive measure?

 

 

A. Encrypt the JavaScript files
B. Store secrets in environment variables on the server
C. Use stronger passwords
D. Obfuscate the HTML
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23