Join WhatsApp ChannelDaily MCQs & Exam Updates

Computer Science MCQs

MCQs on Programming, Networking, Database and OS

25 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
1
Medium css pms fpsc ppsc nts

Which data structure is primarily used by the Depth-First Search (DFS) algorithm?

  • A Queue
  • B Hash Table
  • C Stack
  • D Heap
Permalink
Correct Answer: Option C — Stack
Explanation: Depth-First Search (DFS) uses a stack to keep track of nodes during traversal. The algorithm explores one branch of a graph or tree as deeply as possible before backtracking to explore other branches. DFS can use an explicit stack or the system's call stack through recursion. This approach is useful for pathfinding, graph traversal, cycle detection, and topological sorting.
Submitted by: Chandi
2
Medium css pms fpsc ppsc nts

What does "GPT" stand for in ChatGPT?

  • A Global Prediction Technique
  • B Generative Pre-trained Transforme
  • C General Processing Tool
  • D Graphical Pattern Tracke
Permalink
Correct Answer: Option B — Generative Pre-trained Transforme
Explanation: GPT stands for Generative Pre-trained Transformer. It is a family of artificial intelligence language models developed by OpenAI. These models are pre-trained on large amounts of text to learn language patterns and can then generate human-like responses, answer questions, summarize information, translate text, assist with coding, and perform many other natural language processing tasks.
Submitted by: Chandi
3
Medium css pms fpsc ppsc nts

In Machine Learning, what is a hyperparameter?

  • A A configuration set before training
  • B A learned weight
  • C An output label
  • D A type of dataset
Permalink
Correct Answer: Option A — A configuration set before training
Explanation: A hyperparameter is a setting or configuration chosen before training a machine learning model. Unlike model parameters, which are learned from data during training, hyperparameters are predefined by the user. Examples include the learning rate, batch size, number of epochs, and the number of hidden layers. Proper hyperparameter selection can significantly improve a model's accuracy and performance.
Submitted by: Chandi
4
Medium css pms fpsc ppsc nts

What is the full form of "NLP" in Artificial Intelligence and Computer Science?

  • A Numeric Learning Program
  • B Network Layer Protocol
  • C Neural Logic Processing
  • D Natural Language Processing
Permalink
Correct Answer: Option D — Natural Language Processing
Explanation: Natural Language Processing (NLP) is a branch of Artificial Intelligence (AI) that enables computers to understand, interpret, generate, and respond to human language. NLP is used in applications such as chatbots, language translation, speech recognition, sentiment analysis, voice assistants, and text summarization, allowing machines to communicate more naturally with people
Submitted by: Chandi
5
Medium css pms fpsc ppsc nts

Which search algorithm explores all nodes one level at a time before moving to the next level?

  • A A* Search
  • B Depth-First Search (DFS)
  • C Breadth-First Search (BFS)
  • D Greedy Search
Permalink
Correct Answer: Option C — Breadth-First Search (BFS)
Explanation: Breadth-First Search (BFS) explores a graph or tree level by level, visiting all nodes at the current depth before moving to the next level. It uses a queue (FIFO) data structure to manage nodes. BFS is particularly useful for finding the shortest path in an unweighted graph because it guarantees the minimum number of edges from the starting node to the destination.
Submitted by: Chandi
6
Medium css pms fpsc ppsc nts

Why are Headers and Footers added to a document in MS Word?

  • A To mark the beginning of a page
  • B To improve the document's appearance
  • C To display repeating information such as page numbers, dates, and titles on printed pages
  • D To make a document easier to read
Permalink
Correct Answer: Option C — To display repeating information such as page numbers, dates, and titles on printed pages
Explanation: Headers and Footers are used to place information that appears repeatedly on every page of a document, such as page numbers, document titles, dates, author names, or company names. This feature helps maintain consistency, improves document organization, and ensures important information is visible when the document is printed or viewed electronically.
Submitted by: Chandi
7
Medium css pms fpsc ppsc nts

On which tab in Microsoft Word can you find the Header and Footer commands?

  • A Home
  • B References
  • C View
  • D Insert
Permalink
Correct Answer: Option D — Insert
Explanation: In Microsoft Word, the Header and Footer options are located on the Insert tab. These features allow users to add information such as page numbers, document titles, dates, author names, and other repetitive content at the top (header) or bottom (footer) of every page. This helps create professional and well-organized documents.
Submitted by: Chandi
8
Medium css pms fpsc ppsc nts

What type of communication occurs between a computer and a keyboard?

  • A Full-Duplex
  • B Simplex
  • C Half-Duplex
  • D Multiplex
Permalink
Correct Answer: Option B — Simplex
Explanation: Simplex communication is a one-way communication method in which data flows in only one direction. In the case of a keyboard and a computer, the keyboard sends input signals to the computer, but it does not receive data back for communication purposes. Therefore, this interaction is commonly classified as simplex communication in computer networking and data communication concepts.
Submitted by: Chandi
9
Medium css pms fpsc ppsc nts

Which protocol is commonly used to create a secure and encrypted communication channel over the Internet?

  • A HTTPS (SSL/TLS)
  • B FTP
  • C DHCP
  • D Telnet
Permalink
Correct Answer: Option A — HTTPS (SSL/TLS)
Explanation: HTTPS (HyperText Transfer Protocol Secure) uses SSL/TLS encryption to protect data exchanged between a user's browser and a web server. It ensures confidentiality, integrity, and authentication of information, preventing attackers from intercepting or modifying sensitive data such as passwords, payment details, and personal information while it is transmitted over potentially insecure networks.
Submitted by: Chandi
10
Medium css pms fpsc ppsc nts

What is the main purpose of a Firewall in a computer network?

  • A To prevent unauthorized access
  • B To remove all viruses from a computer
  • C To increase internet speed
  • D To store network Data
Permalink
Correct Answer: Option A — To prevent unauthorized access
Explanation: A Firewall is a network security system that monitors and controls incoming and outgoing traffic based on predefined security rules. Its primary purpose is to prevent unauthorized users, hackers, or malicious programs from accessing a computer or network. While a firewall can help block some threats, it is not a substitute for antivirus software and does not increase network speed.
Submitted by: Chandi
11
Medium css pms fpsc ppsc nts

Which bus is primarily responsible for transferring data between the CPU and memory?

  • A Address Bus
  • B Expansion Bus
  • C Control Bus
  • D Data Bus
Permalink
Correct Answer: Option D — Data Bus
Explanation: The Data Bus is used to transfer actual data between the CPU, memory, and other hardware components. It carries information in both directions, allowing the processor to read data from memory and write data back to it. The width of the data bus affects how much data can be transferred at one time, influencing overall system performance and speed.
Submitted by: Chandi
12
Medium css pms fpsc ppsc nts

Which sorting algorithm generally provides the best average-case performance for large datasets?

  • A Quick Sort
  • B Merge Sort
  • C Bubble Sort
  • D Selection Sort
Permalink
Correct Answer: Option A — Quick Sort
Explanation: Quick Sort is often considered the fastest sorting algorithm in the average case because it has an average time complexity of O(n log n) and requires relatively low memory. It works by selecting a pivot element and partitioning the array into smaller subarrays. Although its worst-case complexity is O(n²), careful pivot selection usually results in very efficient performance in real-world applications.
Submitted by: Chandi
13
Medium css pms fpsc ppsc nts

Which memory type is most commonly used to store firmware in embedded systems?

  • A RAM
  • B Virtual Memory
  • C Cache Memory
  • D ROM
Permalink
Correct Answer: Option D — ROM
Explanation: ROM (Read-Only Memory) is commonly used to store firmware in embedded systems because it retains data even when power is turned off. Firmware contains essential instructions required for hardware initialization and operation. Unlike RAM, ROM provides non-volatile storage, making it reliable for permanent system software and device control programs.
Submitted by: Chandi
14
Medium css pms fpsc ppsc nts

Who co-invented the World Wide Web (WWW) alongside Robert Cailliau?

  • A Tom Berners
  • B Mark Zuckerberg
  • C Tim Berners-Lee
  • D Bill Gates
Permalink
Correct Answer: Option C — Tim Berners-Lee
Explanation: Tim Berners-Lee, together with Robert Cailliau, played a key role in developing the World Wide Web at CERN in 1989. Berners-Lee created fundamental web technologies such as HTML, HTTP, and the first web browser. Their work transformed the internet into a user-friendly system for sharing and accessing information worldwide.
Submitted by: Chandi
15
Medium css pms fpsc ppsc nts

Who is widely regarded as the father of Computer Science?

  • A John von Neumann
  • B Alan Turing
  • C Charles Babbage
  • D Bill Gates
Permalink
Correct Answer: Option B — Alan Turing
Explanation: Alan Turing is widely known as the father of Computer Science because he developed the theoretical foundation of modern computing. In 1936, he introduced the concept of the Turing Machine, which demonstrated how computers can process information and solve problems through algorithms. His work also played a major role in the development of artificial intelligence and computer theory, making him one of the most influential figures in computing history.
Submitted by: Chandi
16
Medium css pms fpsc ppsc nts

What is the default port number for HTTPS?

  • A 21
  • B 25
  • C 80
  • D 443
Permalink
Correct Answer: Option D — 443
Explanation: HTTPS (HyperText Transfer Protocol Secure) uses port 443 by default to provide secure communication over the Internet. It encrypts data using SSL/TLS protocols, protecting sensitive information such as passwords, banking details, and personal data from attackers
Submitted by: PaperMCQs
17
Medium fpsc nts

Which network topology uses a single communication backbone?

  • A Star
  • B Mesh
  • C Bus
  • D Ring
Permalink
Correct Answer: Option C — Bus
Explanation: Bus topology connects devices through a shared communication line called a backbone. Although simple and inexpensive, failures in the backbone can affect the entire network.
Submitted by: PaperMCQs
18
Medium fpsc nts

Which Excel function counts non-empty cells?

  • A COUNT()
  • B COUNTA()
  • C COUNTIF()
  • D SUM()
Permalink
Correct Answer: Option B — COUNTA()
Explanation: COUNTA counts all non-empty cells including text, numbers, and logical values. It is useful when determining how many cells contain data regardless of data type.
Submitted by: PaperMCQs
19
Medium fpsc nts

Which protocol is used for receiving email in modern systems?

  • A IMAP
  • B SMTP
  • C DNS
  • D FTP
Permalink
Correct Answer: Option A — IMAP
Explanation: IMAP allows users to access and manage email directly on the server across devices.
Submitted by: PaperMCQs
20
Medium fpsc nts

Which SQL command modifies existing records?

  • A INSERT
  • B DELETE
  • C UPDATE
  • D SELECT
Permalink
Correct Answer: Option C — UPDATE
Explanation: The UPDATE statement changes existing records in a database table according to specified conditions.
Submitted by: PaperMCQs