T4Tutorials .PK

NSCT – Server-Side Programming MCQs

1. . Server-side programming refers to:

(A) Code executed on the server to handle requests, process data, and generate responses


(B) Styling web pages


(C) Structuring HTML content


(D) Animating elements on the client side




2. . Common server-side programming languages include:

(A) SQL only


(B) HTML, CSS, JavaScript only


(C) Node.js (JavaScript), Python, PHP, Ruby, Java, C#


(D) Bash scripts only




3. . The main responsibilities of server-side programming are:

(A) Optimizing CPU only


(B) Only styling web pages


(C) Only creating HTML


(D) Handling client requests, interacting with databases, processing business logic, and returning responses




4. . In Node.js, the http module is used to:

(A) Style web pages


(B) Create web servers and handle HTTP requests and responses


(C) Structure HTML


(D) Optimize CPU only




5. . Express.js is used for:

(A) Structuring CSS


(B) Styling web pages


(C) Simplifying server-side development with routing, middleware, and API handling


(D) Optimizing CPU only




6. . Middleware functions in server-side frameworks:

(A) Optimize CPU


(B) Only style HTML elements


(C) Create databases only


(D) Process requests before reaching the main route or after sending a response




7. . RESTful APIs in server-side programming:

(A) Use HTTP methods (GET, POST, PUT, DELETE) for CRUD operations


(B) Style web pages


(C) Structure HTML only


(D) Optimize CPU




8. . The difference between GET and POST requests is:

(A) GET optimizes CPU only


(B) Both do the same thing


(C) GET sends data, POST retrieves data


(D) GET requests retrieve data, POST requests send data to the server




9. . Sessions in server-side programming are used to:

(A) Store user data across multiple requests for login and personalization


(B) Only style HTML elements


(C) Create CSS grids


(D) Optimize CPU only




10. . Cookies in server-side programming:

(A) Create HTML structure


(B) Style elements


(C) Store small pieces of data on the client-side to maintain state


(D) Optimize CPU only




11. . Authentication on the server-side:

(A) Structures HTML


(B) Adds CSS styles


(C) Verifies the identity of users


(D) Optimizes CPU only




12. . Authorization on the server-side:

(A) Styles HTML


(B) Verifies identity only


(C) Determines user permissions to access resources


(D) Optimizes CPU only




13. . Server-side frameworks often support templating engines like:

(A) HTML only


(B) EJS, Pug, Handlebars


(C) CSS only


(D) JavaScript only




14. . Server-side programming often interacts with databases using:

(A) SQL queries or ORM libraries


(B) CSS grids


(C) HTML only


(D) CPU optimization scripts




15. . An ORM (Object-Relational Mapper) allows:

(A) Styling HTML elements


(B) Accessing database records as objects in code


(C) Structuring CSS only


(D) Optimizing CPU




16. . Server-side programming improves security by:

(A) Validating input, protecting routes, and managing authentication/authorization


(B) Styling HTML elements


(C) Structuring CSS only


(D) Optimizing CPU




17. . Server-side rendering (SSR) refers to:

(A) Structuring CSS only


(B) Styling elements dynamically


(C) Optimizing CPU only


(D) Generating HTML on the server and sending it to the client




18. . Backend and server-side programming differ because:

(A) Server-side is client code


(B) They are the same


(C) Backend is the broader system including database and logic, server-side focuses on code executed on the server


(D) Backend only styles pages




19. . Web servers commonly used in server-side programming include:

(A) React, Angular, Vue


(B) Apache, Nginx, Microsoft IIS


(C) Node.js only


(D) MySQL, PostgreSQL




20. . The ultimate goal of server-side programming is:

(A) Only style web pages


(B) Build secure, scalable, efficient, and dynamic web applications that process and serve data


(C) Structure HTML only


(D) Optimize CPU only




Exit mobile version