Join WhatsApp ChannelDaily MCQs & Exam Updates

Computer Science MCQs

MCQs on Programming, Networking, Database and OS

120 Questions
Subject Preparation Guide

Prepare Computer Science with confidence

Strengthen your knowledge of computer fundamentals, hardware, software, programming, networks, databases and information technology.

Computer BasicsProgrammingNetworksDatabases
Recommended for academic classes, IT tests and computer portions of competitive examinations.
Computer Science preparation illustration
81
Medium fpsc ppsc

What is the primary purpose of RAID technology?

  • A Increase screen resolution
  • B Improve storage performance and reliability
  • C Enhance processor speed
  • D Manage network traffic
Permalink
Correct Answer: Option B — Improve storage performance and reliability
Explanation: RAID combines multiple drives to improve performance, fault tolerance, or both.
Submitted by: PaperMCQs
82
Hard css pms

Which programming paradigm focuses on functions and immutability?

  • A Procedural Programming
  • B Object-Oriented Programming
  • C Functional Programming
  • D Assembly Programming
Permalink
Correct Answer: Option C — Functional Programming
Explanation: Functional programming emphasizes pure functions, immutability, and declarative problem solving.
Submitted by: PaperMCQs
83
Easy ppsc nts

Which search algorithm checks each element sequentially?

  • A Binary Search
  • B Linear Search
  • C Interpolation Search
  • D Hash Search
Permalink
Correct Answer: Option B — Linear Search
Explanation: Linear Search examines items one by one until the target is found or the list ends.
Submitted by: PaperMCQs
84
Medium css pms

What is the purpose of a foreign key?

  • A Store passwords
  • B Identify duplicate records
  • C Create relationships between tables
  • D Encrypt database contents
Permalink
Correct Answer: Option C — Create relationships between tables
Explanation: Foreign keys enforce relationships between tables and maintain referential integrity.
Submitted by: PaperMCQs
85
Medium css fpsc

Which of the following is a NoSQL database?

  • A Oracle
  • B MySQL
  • C MongoDB
  • D PostgreSQL
Permalink
Correct Answer: Option C — MongoDB
Explanation: MongoDB is a document-oriented NoSQL database designed for flexible and scalable data storage.
Submitted by: PaperMCQs
86
Hard css fpsc

What is a deadlock in an operating system?

  • A A memory leak
  • B A security attack
  • C A situation where processes wait indefinitely for resources
  • D A file corruption error
Permalink
Correct Answer: Option C — A situation where processes wait indefinitely for resources
Explanation: Deadlock occurs when processes are permanently blocked waiting for resources held by one another.
Submitted by: PaperMCQs
87
Easy nts

Which protocol is used for file transfer over a network?

  • A FTP
  • B HTTP
  • C SMTP
  • D POP3
Permalink
Correct Answer: Option A — FTP
Explanation: FTP is specifically designed for transferring files between systems over a network.
Submitted by: PaperMCQs
88
Medium css fpsc

What is the purpose of an index in a database?

  • A Reduce security
  • B Improve query performance
  • C Store backups
  • D Encrypt records
Permalink
Correct Answer: Option B — Improve query performance
Explanation: Indexes improve retrieval speed by allowing databases to locate records efficiently.
Submitted by: PaperMCQs
89
Hard css pms

Which topology provides the highest fault tolerance?

  • A Bus
  • B Star
  • C Ring
  • D Mesh
Permalink
Correct Answer: Option D — Mesh
Explanation: Mesh topology offers multiple communication paths between nodes, providing excellent redundancy and fault tolerance.
Submitted by: PaperMCQs
90
Medium css fpsc

Which memory is fastest among the following?

  • A Hard Disk
  • B RAM
  • C Cache Memory
  • D ROM
Permalink
Correct Answer: Option C — Cache Memory
Explanation: Cache memory stores frequently used data close to the CPU and is significantly faster than RAM.
Submitted by: PaperMCQs
91
Medium fpsc nts

Which SQL clause is used to filter rows before grouping?

  • A HAVING
  • B GROUP BY
  • C WHERE
  • D ORDER BY
Permalink
Correct Answer: Option C — WHERE
Explanation: The WHERE clause filters rows before grouping and aggregation are applied.
Submitted by: PaperMCQs
92
Hard css fpsc

Which algorithm is commonly used to find the shortest path in a weighted graph?

  • A Bubble Sort
  • B Dijkstra's Algorithm
  • C Binary Search
  • D Depth First Search
Permalink
Correct Answer: Option B — Dijkstra's Algorithm
Explanation: Dijkstra's Algorithm finds shortest paths in weighted graphs with non-negative edge weights and is widely used in navigation systems.
Submitted by: PaperMCQs
93
Easy ppsc nts

Which command is used to add new records to a database table?

  • A UPDATE
  • B SELECT
  • C INSERT
  • D ALTER
Permalink
Correct Answer: Option C — INSERT
Explanation: The INSERT statement adds new rows into a database table and is one of the most common SQL operations.
Submitted by: PaperMCQs
94
Medium css pms

What is polymorphism in object-oriented programming?

  • A Data hiding
  • B Ability of an object to take multiple forms
  • C Memory allocation
  • D Database indexing
Permalink
Correct Answer: Option B — Ability of an object to take multiple forms
Explanation: Polymorphism allows objects to be treated through a common interface while exhibiting different behaviors depending on their actual type.
Submitted by: PaperMCQs
95
Medium css fpsc

Which OSI layer is responsible for end-to-end communication?

  • A Network Layer
  • B Data Link Layer
  • C Transport Layer
  • D Session Layer
Permalink
Correct Answer: Option C — Transport Layer
Explanation: The Transport Layer provides end-to-end communication, reliability, flow control, and error handling using protocols such as TCP and UDP.
Submitted by: PaperMCQs
96
Medium fpsc nts

Which sorting algorithm repeatedly selects the smallest element and places it in the correct position?

  • A Merge Sort
  • B Quick Sort
  • C Selection Sort
  • D Heap Sort
Permalink
Correct Answer: Option C — Selection Sort
Explanation: Selection Sort repeatedly finds the minimum element from the unsorted portion and places it at the beginning. It is simple but inefficient for large datasets.
Submitted by: PaperMCQs
97
Easy ppsc nts

Which protocol is used to automatically assign IP addresses to devices on a network?

  • A DNS
  • B DHCP
  • C SMTP
  • D SNMP
Permalink
Correct Answer: Option B — DHCP
Explanation: Dynamic Host Configuration Protocol automatically assigns IP addresses and network configuration information to devices, simplifying network administration.
Submitted by: PaperMCQs
98
Medium css fpsc

What is the primary purpose of normalization in relational databases?

  • A Increase redundancy
  • B Reduce redundancy
  • C Increase storage space
  • D Improve graphics rendering
Permalink
Correct Answer: Option B — Reduce redundancy
Explanation: Normalization organizes data into structured tables to minimize redundancy and dependency issues. It improves data integrity, reduces update anomalies, and makes databases easier to maintain and scale in real-world applications.
Submitted by: PaperMCQs
99
Medium fpsc ppsc

Which scheduling algorithm gives each process a fixed time slice?

  • A FCFS
  • B Round Robin
  • C Shortest Job First
  • D Priority Scheduling
Permalink
Correct Answer: Option B — Round Robin
Explanation: Round Robin scheduling assigns a fixed time quantum to each process. If a process does not complete within its allotted time, it is moved to the end of the queue. This approach improves fairness and responsiveness in time-sharing systems.
Submitted by: PaperMCQs
100
Medium css pms

Which data structure is most suitable for implementing recursion?

  • A Queue
  • B Array
  • C Stack
  • D Heap
Permalink
Correct Answer: Option C — Stack
Explanation: Recursion relies on the call stack to store function calls, local variables, and return addresses. Every recursive call creates a new stack frame, which is removed when the function returns. This makes the stack the fundamental data structure behind recursion.
Submitted by: PaperMCQs