Home MCQs COMPUTER SCIENCE
COMPUTER SCIENCE

Computer Science Mcqs with Answers

Practice Computer Science MCQs with answers covering programming, databases, networks, operating systems, algorithms, cybersecurity, web development and IT for FPSC, PPSC, SPSC, NTS, CSS and PMS exams.

Practice MCQs Solved Questions Exam Preparation
47 Total MCQs
17 Topics
40 Past Papers
Q1
In computers, RAM stands for:
A Random Access Memory
B Reading Actual Memory
C Read & Memorize
D Reading Access Memory
Explanation
RAM stands for Random Access Memory. It is a type of volatile memory that temporarily stores data and instructions currently being used by the computer.
Q2
Select an option of a user interface that is more user-friendly than the other provided option:
A MS DOS
B Apple DOS
C GUI
D Linux Terminal
Explanation
GUI (Graphical User Interface) is generally more user-friendly because it allows users to interact with a computer through graphical elements such as icons, menus, windows, and buttons.
Q3
If you want to create a field to store a person's address in a table, which data type should you use?
A Integer
B String
C Character
D Floating Point
Explanation
A string data type is used to store text. A person's address may contain multiple words, numbers, and symbols, so a string is appropriate.
Q4
To uniquely identify a record in a table we need a _____ key:
A Foreign Key
B Composite Key
C Primary Key
D Table Key
Explanation
A Primary Key uniquely identifies each record in a database table. Each primary-key value must be unique.
Q5
Among the following, which one is not a function of an operating system?
A Booting
B Memory Management
C I/O Management
D Text Editing
Explanation
Text editing is performed by a text editor or other application software. Operating systems perform functions such as memory management, input/output management, and booting.
Q6
To use a spreadsheet, we use _____ software:
A MS PowerPoint
B MS Word
C MS Access
D MS Excel
Explanation
MS Excel is spreadsheet software used to organize data, perform calculations, create formulas, and produce charts.
Q7
Which of the following is not a web design tool?
A WordPress
B Figma
C Wix
D Oracle
Explanation
Oracle is primarily a database management system and is not a web design tool. WordPress and Wix are commonly used for website creation, while Figma is widely used for interface and web design.
Q8
Open System Interconnection (OSI) model is a conceptual model with _____ layers:
A 5
B 7
C 4
D 6
Explanation
The OSI model has seven layers: Physical, Data Link, Network, Transport, Session, Presentation, and Application.
Q9
Which of the following options is a branch of Artificial Intelligence (AI)?
A Programming
B Machine Learning
C Deep Thinking
D Microprocessors
Explanation
Machine Learning is a major branch of Artificial Intelligence that enables computers to learn patterns from data and improve their performance without being explicitly programmed for every task.
Q10
Which one of the following could be a line of code from Machine Language programming?
A print("Hello world")
B cout<<"Hello world";
C Move 1, A
D 10101110111101111
Explanation
Machine language consists of instructions represented in binary form, using 0s and 1s. The other options represent higher-level or assembly-style programming.
Q11
From the following options, which computing device belongs to the first generation of computers?
A IBM 7094
B Electronic Numerical Integrator and Calculator (ENIAC)
C IBM 1401
D Intel Pentium-I
Explanation
ENIAC was an early electronic general-purpose computer and is classified among first-generation computers, which primarily used vacuum tubes.
Q12
If you are asked to classify computers based on their size, which of the following options correctly represents this classification?
A Analog, Digital, Hybrid
B General Purpose, Special Purpose
C Mainframe, Minicomputer, Supercomputer, Microcomputer
D Core2, Core2 Duo, Core i3
Explanation
Computers can traditionally be classified by size and processing capability into categories such as supercomputers, mainframes, minicomputers, and microcomputers.
Q13
Among the following options, which are the five main components of a communication system?
A Message, Sender, Receiver, Medium, Protocol
B Message, Sender, Receiver, Network, Wire
C Sender, Receiver, Protocol, Signal, Computer
D Sender, Receiver, Wire, Signal, Computer
Explanation
A communication system commonly involves a sender, message, receiver, communication medium, and protocol. The protocol provides rules for how the communication takes place.
Q14
Which of the following is NOT an approach to handling deadlocks?
A Deadlock Prevention
B Deadlock Avoidance
C Deadlock Detection & Recovery
D Virtual Memory
Explanation
Deadlock Prevention, Deadlock Avoidance, and Deadlock Detection & Recovery are standard methods for handling deadlocks. Virtual Memory deals with memory management by allowing processes to use virtual address space beyond available physical memory.
Q15
Which scheduler selects which processes should be brought into the ready queue?
A Real-Time
B Long-Term
C Mid-Term
D Short-Term
Explanation
The Long-Term Scheduler, also called the Job Scheduler, controls the degree of multiprogramming by selecting processes from the job pool and admitting them into the ready queue. The Short-Term Scheduler selects a process from the ready queue for CPU execution, while the Mid-Term Scheduler is mainly involved in swapping processes in and out of memory.
Q16
A piece of code that only one thread can execute at a time is called:
A Mutual Exclusion
B Critical Section
C Synchronization
D All of them
Explanation
A Critical Section is a part of a program where shared resources are accessed or modified. To prevent race conditions, only one thread or process should execute the critical section at a time. Mutual exclusion is the mechanism that ensures this restriction, while synchronization is the broader concept of coordinating concurrent processes or threads.
Q17
When a thread waits indefinitely for some resource, but other threads are actually using it, it is called:
A Starvation
B Demand Paging
C Segmentation
D None of them
Explanation
Starvation is a condition in which a process or thread waits indefinitely for a resource or CPU time because other processes or threads are repeatedly given priority. It can occur when resource allocation or scheduling is unfair.
Q18
Paging is implemented in:
A Operating System
B Hardware
C Software
D None of these
Explanation
Paging is a memory-management scheme used by the operating system to divide logical memory into fixed-size pages and physical memory into fixed-size frames. The operating system manages the mapping between pages and frames using page tables.
Q19
Page-Table Length Register (PTLR) indicates the size of:
A Page Table
B Paging File
C Main Memory
D Virtual Memory
Explanation
The Page-Table Length Register (PTLR) indicates the size or length of the page table. It helps determine the number of entries present in the page table for a process.
Q20
Bringing a page into memory only when it is needed is called:
A Demand Paging
B Page Replacement
C Page Fault
D Page Segmentation
Explanation
Demand Paging is a virtual memory technique in which pages are loaded into physical memory only when they are needed. If a required page is not currently in memory, a page fault occurs and the operating system loads the page from secondary storage.
Previous 1 2 3 Next

COMPUTER SCIENCE

Computer Science MCQs cover important concepts in programming, databases, computer networks, operating systems, data structures, algorithms, software engineering, cybersecurity, web technologies and information technology. This collection helps students and candidates revise essential computer concepts and prepare for FPSC, PPSC, SPSC, NTS, CSS, PMS and other competitive examinations.