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.
47
Total MCQs
17
Topics
40
Past Papers
Q1
In computers, RAM stands for:
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:
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?
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:
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?
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:
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?
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:
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)?
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?
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?
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?
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?
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?
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?
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:
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:
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:
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:
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:
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.
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.