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
101
Medium css fpsc

What is the purpose of a firewall?

  • A Increase processor speed
  • B Protect networks from unauthorized access
  • C Store files permanently
  • D Compress data
Permalink
Correct Answer: Option B — Protect networks from unauthorized access
Explanation: A firewall monitors and filters network traffic according to predefined security rules. It acts as a barrier between trusted and untrusted networks, helping prevent unauthorized access and cyberattacks.
Submitted by: PaperMCQs
102
Easy fpsc nts

Which protocol translates domain names into IP addresses?

  • A HTTP
  • B FTP
  • C DNS
  • D SSH
Permalink
Correct Answer: Option C — DNS
Explanation: The Domain Name System (DNS) converts human-readable domain names into numerical IP addresses. This translation allows users to access websites using easy-to-remember names instead of complex numeric addresses.
Submitted by: PaperMCQs
103
Medium css pms

What is encapsulation in object-oriented programming?

  • A Combining data and methods into a single unit
  • B Creating multiple classes
  • C Executing parallel processes
  • D Allocating memory dynamically
Permalink
Correct Answer: Option A — Combining data and methods into a single unit
Explanation: Encapsulation is the process of bundling data and methods within a class while restricting direct access to internal details. It improves modularity, maintainability, and security by controlling how data is accessed and modified.
Submitted by: PaperMCQs
104
Easy ppsc nts

Which database key uniquely identifies each record in a table?

  • A Foreign Key
  • B Candidate Key
  • C Primary Key
  • D Composite Key
Permalink
Correct Answer: Option C — Primary Key
Explanation: A Primary Key uniquely identifies each record in a database table. It cannot contain duplicate values or NULL values and ensures entity integrity within relational database systems.
Submitted by: PaperMCQs
105
Medium css fpsc

What is the time complexity of Binary Search in the worst case?

  • A O(n)
  • B O(log n)
  • C O(n²)
  • D O(1)
Permalink
Correct Answer: Option B — O(log n)
Explanation: Binary Search repeatedly divides a sorted dataset into halves until the target value is found or determined absent. Because the search space is halved each step, the worst-case time complexity is logarithmic, O(log n).
Submitted by: PaperMCQs
106
Medium css fpsc

Which layer of the OSI model is responsible for routing packets?

  • A Transport Layer
  • B Network Layer
  • C Session Layer
  • D Presentation Layer
Permalink
Correct Answer: Option B — Network Layer
Explanation: The Network Layer is responsible for logical addressing and routing of packets between networks. Protocols such as IP operate at this layer, enabling data to travel across interconnected networks efficiently.
Submitted by: PaperMCQs
107
Medium css pms

Which data structure follows the Last In First Out (LIFO) principle?

  • A Queue
  • B Array
  • C Stack
  • D Linked List
Permalink
Correct Answer: Option C — Stack
Explanation: A stack follows the Last In First Out principle, meaning the most recently added element is removed first. Stacks are widely used in function calls, recursion, expression evaluation, and memory management.
Submitted by: PaperMCQs
108
Easy nts

What does URL stand for?

  • A Universal Resource Locator
  • B Uniform Resource Locator
  • C Unified Resource Link
  • D Universal Retrieval Link
Permalink
Correct Answer: Option B — Uniform Resource Locator
Explanation: A Uniform Resource Locator (URL) specifies the address of a resource on the Internet. It identifies the protocol and location needed to access web pages, files, and other online services.
Submitted by: PaperMCQs
109
Easy ppsc nts

Which SQL command is used to retrieve data from a database?

  • A INSERT
  • B UPDATE
  • C SELECT
  • D DELETE
Permalink
Correct Answer: Option C — SELECT
Explanation: The SELECT statement retrieves data from one or more database tables. It is one of the most frequently used SQL commands and supports filtering, sorting, grouping, and joining data for analysis and reporting.
Submitted by: PaperMCQs
110
Easy fpsc ppsc

Which device is responsible for connecting different networks together?

  • A Switch
  • B Hub
  • C Router
  • D Repeater
Permalink
Correct Answer: Option C — Router
Explanation: A router connects multiple networks and forwards data packets between them based on IP addresses. It determines the most efficient path for data transmission and plays a critical role in Internet communication.
Submitted by: PaperMCQs
111
Easy fpsc nts

Which protocol is primarily used for sending emails over the Internet?

  • A HTTP
  • B SMTP
  • C FTP
  • D DNS
Permalink
Correct Answer: Option B — SMTP
Explanation: Simple Mail Transfer Protocol (SMTP) is the standard protocol used for sending email messages between servers and from clients to servers. It works alongside protocols such as POP3 and IMAP, which are used for receiving emails.
Submitted by: PaperMCQs
112
Easy ppsc nts

What is the primary function of an operating system?

  • A Create websites
  • B Manage hardware and software resources
  • C Compile programs
  • D Design databases
Permalink
Correct Answer: Option B — Manage hardware and software resources
Explanation: An operating system acts as an intermediary between users and computer hardware. It manages memory, processes, files, devices, and security while providing services that allow applications to run efficiently and reliably.
Submitted by: PaperMCQs
113
Easy nts

Which number system is directly understood by a computer?

  • A Decimal
  • B Binary
  • C Octal
  • D Hexadecimal
Permalink
Correct Answer: Option B — Binary
Explanation: Computers operate using electronic circuits that recognize only two states, represented as 0 and 1. Therefore, all data and instructions are ultimately processed in binary form, making binary the fundamental language of computing systems.
Submitted by: PaperMCQs
114
Easy fpsc nts

Which type of memory loses its contents when power is turned off?

  • A ROM
  • B Flash Memory
  • C RAM
  • D Hard Disk
Permalink
Correct Answer: Option C — RAM
Explanation: Random Access Memory (RAM) is volatile memory, meaning its contents are lost when power is removed. RAM temporarily stores data and instructions currently being used by the CPU, enabling fast access and efficient processing.
Submitted by: PaperMCQs
115
Easy fpsc ppsc nts

The internet protocol "HTTP" stands for:

  • A Hyper Text Transfer Protocol
  • B High Tech Transfer Protocol
  • C Hyper Text Transmission Protocol
  • D Hyper Transfer Text Protocol
Permalink
Correct Answer: Option A — Hyper Text Transfer Protocol
Explanation: HTTP stands for HyperText Transfer Protocol. It is the foundation of data communication on the World Wide Web. HTTPS (S for Secure) is its encrypted version.
Submitted by: PaperMCQs
116
Easy fpsc ppsc nts

What does RAM stand for?

  • A Random Access Memory
  • B Read Access Memory
  • C Rapid Access Memory
  • D Random Application Memory
Permalink
Correct Answer: Option A — Random Access Memory
Explanation: RAM stands for Random Access Memory. It is a type of volatile memory that temporarily stores data that the CPU is currently using. Data is lost when power is turned off.
Submitted by: PaperMCQs
117
Medium css fpsc

Which programming language is known as the "mother of all languages"?

  • A Python
  • B Java
  • C C
  • D FORTRAN
Permalink
Correct Answer: Option C — C
Explanation: C programming language is often called the "mother of all languages" because many modern programming languages like C++, Java, and Python are derived from or influenced by C.
Submitted by: PaperMCQs
118
Easy fpsc ppsc nts

What is the full form of HTML?

  • A Hyper Text Markup Language
  • B High Text Making Language
  • C Hyper Transfer Markup Language
  • D High Technology Markup Language
Permalink
Correct Answer: Option A — Hyper Text Markup Language
Explanation: HTML stands for HyperText Markup Language. It is the standard markup language for creating web pages and web applications.
Submitted by: PaperMCQs
119
Easy ppsc nts

Which of the following is NOT an operating system?

  • A Windows 11
  • B Ubuntu Linux
  • C Microsoft Word
  • D macOS Ventura
Permalink
Correct Answer: Option C — Microsoft Word
Explanation: Microsoft Word is a word processing application software, not an operating system. Windows, Ubuntu, and macOS are all operating systems that manage computer hardware and software.
Submitted by: PaperMCQs
120
Easy fpsc ppsc nts

What does CPU stand for?

  • A Central Processing Unit
  • B Central Program Unit
  • C Computer Processing Unit
  • D Central Processor Utility
Permalink
Correct Answer: Option A — Central Processing Unit
Explanation: CPU stands for Central Processing Unit. It is the primary component of a computer that performs most of the processing. It is often called the "brain" of the computer.
Submitted by: PaperMCQs