You are on page 1of 267

1 Computer Science MCQs for NTS / PPSC

Virtual University of Pakistan


A world class education on your door Step
Computer Science MCQs
Total MCQs: 3796
Sr. No. Subject Total MCQs Page No.

1 CS101-Introduction to Computing 260 02

2 CS201-Introduction to Programming 227 21

3 CS301-Data Structures 242 36

4 CS302-Digital Logic Design 179 57

5 CS304-Object Oriented Programming 201 69

6 CS401-Assembly Language Program 225 85

7 CS402-Theory of Automata 260 97

8 CS403-Database Management 240 114

9 CS502-Fundamentals of Algorithms 249 134

10 CS601-Data Communication 680 152

11 CS607-Artificial Intelligence 188 196

12 CS609-System Programming 240 210

13 CS610-Computer Network 304 224

14 CS MCQs from past papers of NTS / PPSC 301 242

www.vumultan.com
Published By
Safi Khan

Safi Khan | Virtual University of Pakistan


2 Computer Science MCQs for NTS / PPSC

CS101-Introduction to Computing
ID Qus A B C D Ans
1 An algorithm that Deterministic Non deterministic Greedy Algorithm Randomized C
always takes the best Algorithm Algorithm Algorithm
immediate or local
solution while finding
an answer is
called____.
2 Which of the following Clear Edit Undo Break C
command allows you
to recover form
mistakes in MS Word?
3 ____________ Single user Multi- user Single tasking Multi tasking B
operating system
allows many users to
take advantage of the
computer's resources,
simultaneously
4 Network Interface Input Output Input/Output Storage C
Card is an __________
device
5 The decimal 7 8 9 10 B
equivalent of binary
1000 is
6 Which of the following My Sql MS Excel Oracle SQL Server B
is NOT RDBMS
software?
7 A computer virus is a Software that saves Application software Program that Program that C
the computer from that helps to make spreads itself and corrects the
being damaged. different type of destroys other problems in
viruses and worms program your computer
8 What will be the result 23 -23 23.0 2.3 A
of a? a = Math.abs(-
23)
9 A Special program TFlash Vflash plug-in None of the C
required to view swf given options
(Shockwave Flash) files
in web Browser is
called
10 Using Java Script you By applying With the help of With the help of There is no built D
can write a character randomCh() method String object random character in approach in
at random location on property Java Script
screen
11 If incorrectly we enter Limit Integrity Type Integrity Referential Integrity Physical A
the negative age it is Integrity
check by
12 Which protocol is use UDP FTP TCP OSI B
to transfer a file over
the network?
13 One can send an email HTTP SMTP FTP TELNET D
message to a remote
computer using

Safi Khan | Virtual University of Pakistan


3 Computer Science MCQs for NTS / PPSC

_______ protocol
14 In a System having Hard part Simple part Development part Quality part A
many parts to be
designed, one should
always do the _____
first
15 Flow control If-Else Loops and If -Else Switch and If-Else All of the given C
constructs in choices
JavaScript includes:
16 ___ provides a simple, Explorer.exe System Files Operating System Application C
consistent way for Software
applications to interact
with the HW without
having to know all the
details of the HW
17 Machine language is Assembly Language Binary Language High Level Language HTML Language C
also called
18 _________ is the best Sun Cray Research Microsoft Apple B
known builder for
supercomputers.
19 The weaknesses of the Pattern recognition & Speed & Innovative Pattern recognition Speed & C
computer are: Storage ideas & Innovative ideas Storage
20 Communication Set of methods Set of protocols Set of rules Device C
protocol is a
__________that
governs the flow of
information over a
network
21 _____________ team Support Configuration Quality Assurance Developer A
is responsible for the Management
maintenance,
expansion ,
improvement of the
infrastructure
consisting of
workstations,
networking
equipment, software
and network security.
22 _____________ team Architecture Business Configuration Developer A
consists on the Development Management
sharpest technical
minds in the company.
23 _______________ is CEO COO CMSO Developer B
responsible for day to
day operations.
24 One of the key Project Manager Team Lead Developer Quality A
responsibilities of the Assurance
___________ is client Engineer
relationship
management.
25 What is the major Its two heavy Cannot be indexed Less attractive Inaccessible A
problem with flash
Safi Khan | Virtual University of Pakistan
4 Computer Science MCQs for NTS / PPSC

based website?
26 Which of the following onAbort onError onLoad onUser D
is NOT an event
handler for image
object?
27 The organizations are Cooperation Shared responsibility Networking All of the given D
learning that business options
can be done in a more
effective manner if
emphasis is placed
upon ___________.
28 ERP is a type of Entertainment Productivity software Business software Scientific C
________. software software
29 In Genetic Algorithm Procedure Recognition of a good Different techniques None of the B
the most important solution given options
thing you should
know, is the
___________.
30 According to a popular The user The builder Both user and None of the A
heuristic, success is builder given options
defined by
___________.
31 Rule of thumb learned Design Heuristic Plan Aim B
through trial and error
is called ___________.
32 JavaScript Variables Dynamically Typed Statically Typed Strong Typed None of the A
are ____________. given options
33 Which of the following Word Excel PowerPoint Outlook Express B
application are
collections of cells?
34 The browser breaks 2 3 4 5 B
down the URL into
________ parts.
35 A named collection of Array Function Variable Object D
properties (data, state)
and methods
(instruction, behavior)
is called
____________.
36 First computer NSFNET FIRSTNET ARPANET ORPHANET C
network was
___________.
37 In JavaScript, a Optional Mandatory Not allowed None of the A
variable declaration is given
38 A protocol used for URL Telnet POP3 SMTP C
receiving email
messages is called
____________.
39 Which one is correct? onUnload onUnLoad onUNLOAD All of the above A
40 Serial arrangement in Loop Sequence Condition Array B
which things follow
logical order or a
recurrent pattern,
Safi Khan | Virtual University of Pakistan
5 Computer Science MCQs for NTS / PPSC

such as statements
executing one by one,
is called __________.
41 Variables allow us to Actual Value Reference Length Name B
manipulate data
through the
___________.
43 Fuzzy logic is based on Ground facts Experience Practice Approximation C
____________.
44 Word Processor is a System Software Application Software Device Utility B
___________.
45 In the old days, Number Boolean Video Text C
databases did NOT
support
____________.
46 In tabular storage, Independent Dependent Interrelated Inconsistent C
fields placed in a
particular row are
strongly ___________.
47 Due to working at Slower Faster Higher Improved A
home, lack of
interaction may result
in ___________
professional growth.
48 Distance learning has Easy communication Online interactive Flexibility All of the given D
got a boost due to the contents options
___________.
49 _____________ Image downloading Image preloading Image uploading Image B
technique can be used postloading
to create smooth
animations or to
display one of several
images based on the
requirement.
50 The ____________ is Tree structured Network paradigm Hierarchical None of the B
becoming the organizational model structure given options
preferred
organizational
structure for more and
more organizations
with the passage of
time.
51 The group of Telecom Engineering Computer Computer Science Information D
technologies Engineering Technology
concerned with the
capturing, processing
and transmission of
information in the
digital electronic form
is
called_____________.
52 A large number of LAN MAN Internet Network C
networks collection

Safi Khan | Virtual University of Pakistan


6 Computer Science MCQs for NTS / PPSC

interconnected
physically is called
______
53 TCP stands for Transfer Center Transmission Control Transmission Center Telephone B
________. protocol Protocol Protocol Center Protocol
54 A collection of data Retrieving Database Information DBMS B
organized in such a
way that the computer
can quickly search for
a desired data item is
known as:
55 ______ is simply a fast Freeware Shareware Firewire Firmware C
port that lets you
connect computer
peripherals and
consumer electronics
to your computer
without restart.
56 Structures, in which Multiple Lists Nested Lists Ordered Lists Un-ordered Lists B
another list starts
before the first list is
finished, are called:
57 The key property of Value Length Name All of the given B
the Array object in choices
JavaScript is
58 Which one is the MS Word MS PowerPoint MS Excel MS Access C
example of
spreadsheet software
?
59 The Encryption of data Data updates Data security Data integrity Data B
is related to accessibility
60 _____ is the process of Data normalization Data management Data Mining None of the C
analyzing large given options
databases to identify
patterns.
61 Which is the user- Query Form Report All of the given C
friendly way of options
presenting data ?
62 form Tags always True False A
placed between the
BODY and /BODY tags
of a Web page
63 Java script has ---------- Limited Versatile Medium Not at all D
------- ability to create
and draw graphics
64 Which of the following Elements should be Elements must Related elements Elements should D
is incorrect for making large enough contrast sufficiently should be visually have no visual
design elements grouped focus
legible?

Which of the following


is incorrect for making
design elements
Safi Khan | Virtual University of Pakistan
7 Computer Science MCQs for NTS / PPSC

legible?

Which of the following


is incorrect for making
design elements
legible?
65 Function is also known subprogram Procedure subroutine All of given A
as ______________.
66 In _____________ 1973 1983 1972 None of the B
TCP\IP protocols given choices
became the only set of
protocols used on the
ARPANET.
67 E-mail system has E-mail client SMTP server POP3 server All of the given D
______ component(s) choices
68 _______ / / /______/ Process Input or Output Decision Connector B
A Parallelogram (Tilted
rectangle) represents
the
________________
flow chart element.
69 If a computer could win a million dollar think like human think but slower do the things B
pass the Turing test prize begins than humans faster
then it would be able
to:
70 Punched cards were Floppy Disk Zip Drives Magnetic storage None of the C
replaced by: given choices
71 The ________virus Malicious Neutral Helpful DoS B
may display an
annoying, but
harmless message
72 The name of very first ABC BCD EDC None of the D
computer was: given choices
73 The internet Geographical based Interest based Country based Religion based B
communities are
___________.
74 Internet is an example Private Public Both Private and None of the B
of ______________ Public given choices
network.
75 The name of first UNIVAC 1 ENIAC EDVAC Altair 8800 A
commercially available
PC was:
76 Algorithm is a Definition of a Sequence of steps to Understanding of a Solving a B
___________. problem solve a problem problem problem
77 A group of information File Database Record Field C
is called __________.
78 _____________ is a Image Handling Image Processing Image Engineering None of these B
branch of computer
science concerned
with manipulating and
enhancing computer
graphics.
79 __________has Computational Computer technology Computing None of the B
Safi Khan | Virtual University of Pakistan
8 Computer Science MCQs for NTS / PPSC

changed our way of technology technology Above


life like no other
technology.
80 Sophisticated event Off-Line In-Line Out-Line Non of the given B
handling is not choices
possible with
_______________
event handling
81 Babbages Analytical Magnetic Tape Floppy Disk Punched Cards None of the C
Engine could store given choices
information
permanently in:
82 There are __________ 4 3 2 None of the C
popular schemes to given choices
reduce the number of
bytes that are required
for storing graphics.
83 The internet-society is While surfing, we are Our every click is Webcams are All of the given D
considered under being watched, recorded and becoming common.
Surveillance because: constantly analyzed to extract Providing a cheap
patterns and way for parents to
behaviors watch their
children's every
move
84 URL is a/an ________ Device Component Address Tool C
85 To improve the time Centered Left Aligned Right Aligned Staggered
for scanning a web
page, text should be
___________.
86 Communications on IMAP and SMTP FTP and HTTP TCP and IP TCP and HTTP C
the internet is
controlled by a set of
two protocols which
are ____________.
88 UL tag is used to underline text end the line create ordered list create D
unordered list
89 A user may access any URL Telnet POP SMTP A
item on the web
through __________.
90 Which one of the Red Green Yellow Blue C
following is NOT a
primary color?
91 The idea of Neural Human nature Human brain Human culture Human actions B
Networks field is
based upon
______________.
92 __________ are those Event called programs Event processed Event driven Event declared C
programs in which the programs programs programs
flow of the program is
determined by the
user's actions (mouse
clicks, key presses) or
messages from other
Safi Khan | Virtual University of Pakistan
9 Computer Science MCQs for NTS / PPSC

programs.
93 Automatic machines Robotics Computers Decision Making Autonomous A
performing various Systems Web Agents
tasks that were
previously done by
humans, are called
____________.
94 country=Hello o P a k B
Pakistan;
document.write(count
ry.charAt(6));
The out put of the
above statement is
_____________.
95 The distance among Increased Expanded Contracted Decreased A
families is
___________ because
of spending more time
on internet.
96 The software used for Wscan Mscan Sscan Vscan C
the scanning of
internet severs, is
called __________.
97 Adding images to html IMG IMAGE PICTURE PIC A
page, we
use___________ tag.
99 The responsibilities of Planning and tracking Detailed design Professional All of the given D
the Team Lead of the project development of options
includes____________ team members
_.
100 When the packets Protocol TCP IP NIC B
reach at destination,
__________
reassembles them into
original message.
101 Many developers write Real code & Pseudo Pseudo code & Real Real code & None of the B
the _________ first code code Artificial code given options
and then
incrementally convert
each line into
_________.
102 Machine language is Assembly Language Binary Language High Level Language HTML Language C
also called
103 In JavaScript, second 2 0 1 3 C
element of an array
has the index:
104 One can download or HTTP SMTP FTP TELNET C
upload files to a
remote computer
using ________
protocol.
105 JavaScript ________ Does Does not Always At times B
support drawing of
Safi Khan | Virtual University of Pakistan
10 Computer Science MCQs for NTS / PPSC

graphics
106 Which of the following More powerful Smaller in size Consume less Costly D
is NOT true about energy
modern computers?
107 Ada written a Analytical Engine Difference Engine Harvard Mark 1 Mechanical A
computer programme engine
for ?
108 A set of stand alone Productivity software Compiled software Secure software Intelligent A
productivity suites software
applications designed
to work together
known as
______________ .
109 Autonomous Web Mobile Agents Softbots Both "Mobile None of these C
Agents are also known Agents" &
as ______________. "Softbots"
110 A communication Set of Methods Set of Protocols Set of rules None of the C
protocol is a given choices
__________that
governs the flow of
information over a
network.
111 By default in a web Blue only Black and Underlined Blue and Bold Blue and D
page Hyper Link for Underlined
another web page is
represented as:
112 The organizations are Cooperation Shared responsibility Networking All of the given D
learning that business
can be done in a more
effective manner if
emphasis is placed
upon
______________.
113 Monitor is an example Output Input Processing None of the A
of __________devices given choices
114 The code in the Body At End Head Separate C
________ portion is
the right choice for
developing larger
JavaScript scripts
115 ___________ based on Genetic Algorithms Rule-based Systems Feed-Forward None of these B
the principles of the Network
logical reasoning
ability of humans.
116 The key benefit of Security Efficiency Lower Cost None of the C
VPNs over given choices
conventional PNs is:
117 In a good presentation Heading Phrases not Sentences not Heading, A
each slide should sentences phrases sentences not
contain____________. phrases
118 A single pixel can 1 million 2 million 10 million 16 million D
acquire approximately
___________ color
Safi Khan | Virtual University of Pakistan
11 Computer Science MCQs for NTS / PPSC

schemes.
119 Which of the following For While Switch Do-While C
is NOT a Loop
statement?
120 Which one of the Rule Compiler Rule Interpreter Rules Base Working A
following is NOT a Memory
component of Rule
Based System?
121 Spread sheet is a type Productivity software Engineering software Mathematical Business A
of _______________. software software
122 A combination of word Corel Draw Desktop Publishing Paint WordPad B
processing and graphic
design is
123 To store rounded r_numbers=Maths.ro r_number=Math.roun r_number=Math.rou r_number=Mat C
number of 8.6 in a unds(8.6) ds(8.6) nd(8.6) hs.round(8.6)
variable called
"r_number", we write
124 Which of the following Flat-file storage is Tabular storage is Flat-file storage is None of the B
is a true statement? better than tabular better than flat-file better than given options
storage. storage. relational storage.
125 The political process is Discussion forums Newsgroups Mailing lists All of the given D
also influenced by the options
use of ___________.
126 The system that None of the given Database Data Management Relational D
manages relational options Management System System Database
database, is called Management
______________. System
127 ____________ DBMS Personal Desktop Enterprise Single-user C
supports data in
terabytes.
128 Trinoo is a __________ DoS Scanning Utility None of the A
software. given options
129 Which of the following More powerful Smaller in size Consume less Costly D
is NOT true about energy
modern computers?
130 Currently the BlueRay 10 GB 50 GB 100 GB 150 GB B
DVD can store more
than ________ of
data.
131 Popular schemes used RGB and Color RGB and Dithering RGB, Color mapping Color mapping D
for reducing bytes for mapping and Dithering and Dithering
storage are:
132 Which protocol is use UDP FTP TCP OSI B
to transfer a file over
the network ?
133 A truth table defines Input -- Outputs Output -- Inputs Process -- Inputs Input -- C
the _________of a Processes
logic function for all
possible _________
134 _________ is the best Sun Cray Research Microsoft Apple B
known builder for
supercomputers
135 Web is a unique accessible to only the accessible from accessible to all accessible to C
Safi Khan | Virtual University of Pakistan
12 Computer Science MCQs for NTS / PPSC

invention by humans owners who control it particular locations humans only the
in terms that it is only educational
institutes
136 client program that Web Application Web Browser Internet Application HTML B
uses HTTP to make
requests to Web
servers throughout the
internet on behalf of
the user.
137 When the packets Protocol TCP IP NIC B
reach at destination,
__________
reassembles them into
original message.
138 Smart editors can Green Grey Blue Red C
automatically color
different parts of
statements in different
colors e.g. comments
in ____________
color.
139 ___________has great Architect Team Lead Project Manager Chief Executive D
PR skills. Officer
140 The key Planning and tracking Arranging of the Client relationship All of the given D
responsibilities of a of the project appropriate resources management options
project manager is
_____________.
141 Which attribute of the source path loc src D
IMG tag tells us about
the source of the
image ____________.
142 In relational database, Tables Rows Columns None of the A
data store in the form given options
of _____________.
143 When+ operator is Adds Subtracts Concatenates Compares C
used with string
operands, it
_____________ both
strings.
144 Which of the following Logical Operations Comparative Floating Point All of the given A
operation is take place Operations Operations options
in ALU?
145 Integrity can be Private or virtual- Encryption Intrusion detectors None of the D
compromised by private networks given options
_____________.
146 Math.ceil(12.01); 12 13 12.0 13.1 B
What will be the value
of a ?
147 You can view a 3-D 3-D display 2-D display On both 2-D and 3-D We can not C
image on a displays view a 3-D
_____________. image
148 The best number of 5 9 11 13 A
lines in a slide is
Safi Khan | Virtual University of Pakistan
13 Computer Science MCQs for NTS / PPSC

____________.
149 A variable can be Local Global Either local or global None of the C
_________ in scope. given options
152 Java script interact Special control Internet explorer Event handlers Java script does C
with user not interact
through__________ with user
153 CONCATENATE Subtract Multiply Join is the right Add C
operator is used answer.
to____________
elements.
154 FTP stands File transmission File transmission path File transfer Fine transfer C
for__________ protocol protocol path
155 Which of the following Bus Storage Memory Processor D
hardware component
of a computer can also
be called as engine?
156 ___________breaks FTP HTTP TCP IP C
down the message to
be sent over the
internet into packets.
157 A function is also Sub-program Procedure Sub-routine All of the given D
called __________. option
158 Capturing events and Function Handling Event Handling Event Procedur All of the given B
responding to them is option
called __________.
159 ___________are those Event called programs Event processed Event driven Event declared C
programs in which the programs programs programs
flow of the program is
determined by the
user's actions (mouse
clicks, key presses) or
messages from other
programs.
160 Event handlers are HEAD BODY SCRIPT TITLE B
placed in the
___________ portion
of a Web page as
attributes in HTML
tags.
161 _________ can be Queries Forms Reports None of the B
used for entering, given options
editing, or viewing
data, one record at a
time.
162 random() function 0 and 1 0 and 10 0 and -10 0 and -1 A
returns a randomly-
selected, floating-
point number between
____________.
163 Spies of one business Industrial Intelligence Industrial Espionage Industrial Spying Industrial A
monitoring the Surveillance
network traffic of their
competitors
Safi Khan | Virtual University of Pakistan
14 Computer Science MCQs for NTS / PPSC

___________.
164 _____________ waits Timeout( ) setTimeout( ) setTime( ) setTimeIn( ) A
for some time and
then launch a function.
165 _______________ Intranet Internet Home LAN B
based communication
allows business
entities to coordinate
the activities
of their globally spread
units with greater
accuracy.
167 Deep Blue was the computer human city game A
name of
168 Information available mostly free of cost costly very cheap of no use A
on the web is
169 Which one is correct? Both C
and
170 Blue Pacific is a name Mini Desktop Micro Super D
of ______ computer.
171 _________________ Microcontrollers Microprocessors Integrated circuits Ports B
are powerful pieces of
hardware, but not
much useful on their
own.
172 _________was known Memory Processor Monitor Mouse B
as mill in Analytical
engine.
173 First electronic ABC UNVAC 1 Harvard Mark 1 IBM PC B
computer was
175 What happens if I start An error will be A nested list will be Previous list will end Nothing will B
a new list without generated created and a new will start. happen
closing the original
one?
176 The most upper right Any Red Green Blue A
pixel of the screen is of
___________ color.
177 Which one of the Robotic Web Agent Decision Support All of the given D
following is an System options
application for
artificial intelligence?
178 Register is a kind of Fast Super fast Slow Very slow A
______memory
179 Which of the following Flat-file storage is Tabular storage is Flat-file storage is None of the B
is a true statement? better than tabular better than flat-file better than given option
storage. storage. relational storage.
180 substring(n, m) returns m2 m1 m+1 m B
a string containing
characters copied from
position n
to___________.
181 The __________ is the Typist Bank manager Operational All of the given A
old profession which is manager options
Safi Khan | Virtual University of Pakistan
15 Computer Science MCQs for NTS / PPSC

being eliminated
because of computing.
182 When web server is Time out Waiting Server busy None of the C
busy it gives the given options
following message to
the user :
183 The group of Telecom Engineering Computer Computer Science Information D
technologies Engineering Technology
concerned with the
capturing, processing
and transmission of
information in the
digital electronic form
is called
184 Microsoft Word is a System Software Freeware Software Shrink-Wrapped Custom-built C
type of: Software Software
185 Users __________, Analyze in detail Muddle through Figure out Read in detail B
how things work.
186 Hardware Data updates Data integrity Data security Data D
malfunctions is related accessibility
to
187 In JavaScript, a || b is a is true or b is false a is true and b is true a is false and b is a is true or b is D
interpreted as true true or both are
true
188 Speakers fall into the True False A
hardware category.
189 onBlur event is Gets focus Losts focus Some thing is typed onBlur is not an B
occurred for a form in event
element when it
____________
190 Module level design Team Lead Developer Project Manager Quality B
and unit testing is the Assurance
responsibility of Expert
_____________.
191 Which function returns floor(x) ceil(x) random() round(x) C
a randomly selected
floating point number
between 0 and 1 ?
192 Functions are also Heuristics Variables Arrays Subprograms D
called:
193 In JavaScript, each A Number An Array A String variable All of the given A
element of array can choices
store data of type
194 The weaknesses of the Pattern recognition & Speed & Innovative Pattern recognition Speed & C
computer are: Storage ideas & Innovative ideas Storage
195 Processed data is Information Data Entity Attribute A
called ________.
196 When we buy a Agreement Ownership Membership Software B
software package, we
do not really buy it, we
just by a license that
allows us to use it, the
___________stays
Safi Khan | Virtual University of Pakistan
16 Computer Science MCQs for NTS / PPSC

with the maker.


197 Name, Border, Source Event Handler Properties Methods None of the B
are the ____________ given options
of the image object.
198 ____________ is in Project Manager CEO Team Lead Developer A
Executive team.
199 Module level design Team Lead Developer Project Manager Quality B
and unit testing the Assurance
responsibility of Expert
_____________.
200 _____________ team Executive Architect Development HR D
is responsible for a
project after the
specifications stage till
the very end.
201 ______________ is a Composite Key Primary key Foreign key None of the B
field that uniquely given options
identifies each record
stored in a table.
203 To store rounded r_number=Maths.rou r_numbers=Maths.ro r_number=Math.rou r_number=Mat D
number of 8.6 in a nd(8.6) unds(8.6) nds(8.6) h.round(8.6)
variable called
"r_number", we
write____________.
204 ___________ color Light Dark Red None of the B
should be used in given options
background for a good
presentation.
205 Which of the following / // /* //* C
symbol is used for
multiple line
comments in
JavaScript?
206 In JavaScript, what will 0 1 2 3 B
be the result of the
follwoing operation
79%3
207 A new cell using HTML
is added in table row
by

B
208 Vacuum tubes were Punch cards Transistors Micro Processors Resistors B
replaced by ___
209 The transistor is a solid 1 2 3 4 C
state semiconductor
device used for
amplification and
switching,
and has __________
terminals.
210 Monte Carlo algorithm Randomized Greedy algorithm both greedy and Heuristics A
is an example of algorithm randomized
Safi Khan | Virtual University of Pakistan
17 Computer Science MCQs for NTS / PPSC

Randomized algorithm
211 The most used form True False B

tag is the
tag.
212 What is the key Cant get bored. Pattern recognition Repetition None A
feature of computer
which is against
human nature.?
213 __________ was Spreadsheet Software Word Processor Presentation Database B
designed as a Software Software Software
replacement for
typewriter
214 Forms can be 2 3 4 5 A
submitted by using
__________ different
methods
215 To display a checkbox CHECKBOX CHECK INPUT INPUTBOX C
on the web page, we
use ________ tag
216 ___________ attribute name action method submit A
of FORM tag is used to
mention a URL when
the form is being
submitted
217 You can ________ Only read Only write Read and write Not read and A
from/to a website write
containing interactive
forms.
218 Using COLSPAN, Upward Downward Both Upward and None of the D
number of rows of the Downward given choices
current cell should
extend itself None of
the given choices
219 ASCII WHITE is the 1.3 billion 1.3 trillion 1.3 miillion 1.3 thousand B
fastest Super
computer which can
perform __________
calculations in one
second.
220 __________ is a HTML Website HTTP Web page A
related collection of
WWW files that
includes a beginning
file called a homepage
221 If a computer could think like human do the things faster win a million dollar store more A
pass the Turing test beings prize information
then it would be able
to: think like human
beings
222 The key strengths of Speed Storage Do not get bored All of the given D
computers choices
are______________.

Safi Khan | Virtual University of Pakistan


18 Computer Science MCQs for NTS / PPSC

223 Compared to vacuum Much smaller size Better reliability Much lower cost All of the given D
tubes, Transistors choices
offer: All of the given
choices
224 Which of the following Transistors Diodes Resistors Vacuum tubes C
is NOT a component of
IC?
225 When we use , what Text will not be visible Text will be in normal Text will be in **** Text will be in C
will happen? format format #### format
227 Word Processor is a System Software Application Software Device Utility B
____________.
228 refers to the firmware DOS BIOS Utility Program None of these C
code which is run by
an IBM compatible PC
when first powered
on.
229 A computer program Operating system Utilities guage Translator Device Drives C
that facilitates the
communication
between the computer
and a peripheral
device is
called_____________.
230 Which of the following Binary Decimal Octal Hexadecimal A
number system is used
by microprocessor?
231 Web site is collection Web pages Information Search Engines None of the B
of related given choices
____________
232 In Spreadsheets, you Numbers Text Formulas None of given C
can create a option
relationship between
two cells by using
233 An algorithm that Deterministic Non deterministic Greedy Algorithm Randomized C
always takes the best Algorithm Algorithm Algorithm
immediate or local
solution while finding
an answer is called
234 An operating system Single user Multi- user Single tasking Multi tasking D
allows many users to
take advantage of the
computer's resources,
simultaneously
235 Network Interface Input Output Input/Output Storage C
Card is an
__________________
_device.
236 The decimal 7 8 9 10 B
equivalent of binary
1000 is
238 What computer Modem Ethernet card VGA Internet B
hardware is essential Connection
for connecting two
Safi Khan | Virtual University of Pakistan
19 Computer Science MCQs for NTS / PPSC

computers in Local
Area Network?
239 The instruction written Operating System Compiler Parser Router B
in high-level language
are converted into
low-level language by
the ___________.
241 Which software can Spreadsheets Image processor Word processor None of these A
provide results of
mathematical
calculations very
easily?
242 Which of the following .doc .gif .tmp .mdb B
is the extension of
graphics files?
243 A hardware device CPU Integrated Circuit Main Storage Memory A
that stores data and
programs, executes
program instructions,
and performs
arithmetic/logic
operations is known as
the ____.
244 The input device that Sensors Speech recognition Mouse. Scanner D
reads printed
characters, symbols, or
graphical images into
the computer is the:
245 The component of the Arithmetic/Logic unit. Control unit. Main memory. Micro B
central processing unit processing chip.
that holds instructions,
stores data and keeps
results during the
processing is called
the:
246 The software that is Web browser Mail Binder E-mail Handler E-mail Client A
used to
write/send/receive an
e-mail is called
247 What does internet A software that helps A company that helps A software that A telephone D
service provider you to connect to you to connect to allows you to network which
mean? internet internet send/receive e-mails helps you to
connect to
internet
248 Which of the following C
cannot come between
the
tag
249 Modem is used: Only to enter data For calculating huge For communication To write C
into computer numbers of data between information on
internet and your the world wide
computer web
250 Search engines: Scan the entire web Search the news Make the list of Are built to A

Safi Khan | Virtual University of Pakistan


20 Computer Science MCQs for NTS / PPSC

for the desired groups for the images that are facilitate the
information required information available on the net scientists
251 ARPANET is Worlds first network Network protocol Latest Internet site Internet game A
252 A group of binary Byte Word Bit Hertz C
digits that a computer
manipulate as a unit is
called
253 Micro controller Are faster then Is another name for Are complete Cost thousands B
microprocessor microprocessor? computer on a chip of dollar per
piece
254 Two major types of Application Software , Application Software , System Software , Database A
software are System Software Database Software Database Software Software ,
Embedded
Software
255 Word representing the www Microsoft microsoft.com http D
protocol in URL
http://www.microsoft.
com is
256 Module level design Team Lead Developer Project Manager Quality B
and unit testing the Assurance
responsibility of Expert
_____________.
258 To store rounded r_number=Maths.rou r_numbers=Maths.ro r_number=Math.rou r_number=Mat D
number of 8.6 in a nd(8.6) unds(8.6) nds(8.6) h.round(8.6)
variable called
"r_number", we write
_____________.
259 What is NOT a key Usability User-friendly Consistency Complexity D
factor while designing
a website?
260 A ____________ Single user Multi- user Single tasking Multi tasking B
operating system
allows many users to
take advantage of the
computer's resources,
simultaneously

Safi Khan | Virtual University of Pakistan


21 Computer Science MCQs for NTS / PPSC

CS201-Introduction to Programming
ID Qus A B C D Ans
1 ofstream is used for________ Input file stream Output file Input and output All of the given B
stream file stream
2 Function prototype is written, Within main After the return Before the return Before call of that A
function statement in statement in main function
main
3 Function prototype is written, Within main After the return Before the return Before call of that A
function statement in statement in main function
main
4 RAID stands Redundant Redundant Array Redundant Array Reduced Array of C
for__________________. Array of of Inexperience of Inexpensive Inexpensive
Inexpensive Devices Devices Devices
Dices
5 If int sum = 54; Then the value of 52 50 51 57 B
the following statement is sum =
sum - 3 ;
6 In while loop the loop counter With in the loop Before entering At the end of the None of the given B
must be initialized, the loop loop options
7 Computer can understand only High level Low level Machine Fourth generation C
__________language code
8 Transpose of a matrix means the first row the first row the Last row the first column B
that when we interchange rows becomes the becomes the first becomes the first becomes the first
and columns_____________ Last column column column row
9 Loops are _______________ Decision Sequential Repetition None of the given C
Structure options
10 C is widely known as Linux Unix Windows Mac OS B
development language of
_______ operating system
11 In_________, we try to have a Analysis Design Coding None of the given A
precise problem statement
12 _________ Keyword is used to break return continue goto A
return some value from a
function.
13 Pointers store the value of a memory address characters None of the given B
____________________ variable
14 < , <= , > , >= are called Arithmetic Logical Relational Conational B
__________ operators.
15 the sizeof operator is used to data variable data type None of the given D
determine the size of
16 If int a = 50; then the value of 15 16 17 18 B
a/= 3; will be,
17 _______________are argb and argv argc and argv argc and argu None of the given B
conventional names of the
command line parameters of the
main() function.
18 From following; which one is the arr[10] = {0.0}; double arr[10]= double arr[10] = double arr[] = 0.0; C
correct syntax of an array 0.0; {0.0};
initialize: Array size is 10 and it is
of double data type to value 0?
19 ________ statement interrupts switch continue goto break D
the flow of control.
Safi Khan | Virtual University of Pakistan
22 Computer Science MCQs for NTS / PPSC

20 From the following; which one is Equal sign = Double equal Both equal and None of the given A
used as an assignment operator? sign == double equal sign options
21 There are mainly -------------------- 2 3 4 5 A
types of software
22 When x = 7; then the expression 1 3 7 2 A
x%= 2; will calculate the value of
x as,
23 A pointer variable can be, Decremented Incremented only Multiplied only Both 1 and 2 D
only
24 set precision is a parameter less True False A
manipulator.
25 We can change a Unary operator True False B
to Binary operator through
operator overloading.
26 delete operator is used to return True False A
memory to free store which is
allocated by the new operator
27 When we do dynamic memory True False A
allocation in the constructor of a
class, then it is necessary to
provide a destructor.
28 What is the functionality of the Default Parameterized Parameterized Default C
following statement? String constructor will constructor will constructor will constructor will
str[5] = ,String(Programming), call for all call for all objects call for first 2 call for first 3
String(CS201)-; objects of array of array objects and objects and
default Parameterized
constructor for constructor for
remaining objects remaining objects
29 What is the sequence of event(s) Only block of Only constructor Memory is Constructor is D
when allocating memory using memory is is called for allocated first called first before
new operator? allocated for objects before calling allocating
objects constructor memory
30 Deleting an array of objects True False A
without specifying [] brackets
may lead to memory leak
31 Which of the following data type short float int double C
will be assumed if no data type is
specified with constant?
33 What will be the correct syntax const int *ptr ; const *int ptr ; int const *ptr ; int *const ptr ; D
of the following statement?
ptr is a constant pointer to
integer.
34 Overloaded member operator Class Object Compiler Primitive data B
function is always called by type
_______
35 Loader loads the executable True False A
code from hard disk to main
memory.
36 Which of the following is the new int(10) ; new int[10] ; int new(10) ; int new[10]; B
correct C++ syntax to allocate
space dynamically for an array of
10 int?
37 The prototype of friend inside, inside the inside, outside outside, inside the outside, outside B
Safi Khan | Virtual University of Pakistan
23 Computer Science MCQs for NTS / PPSC

functions must be written ____ class the class class the class
the class and its definition must
be written ____
38 Like member functions, ______ Non-member Friend functions Any function None of the given B
can also access the private data functions outside class options
members of a class.
39 To perform manipulation with iostream.h stdlib.h iomanip.h fstream.h A
input/output, we have to include
_____ header file.
40 The endl and flush are _______ Functions Operators Manipulators Objects C
41 If we want to use stream int, float, double objects of class int, float, object int, char, float B
insertion and extraction
operators with _______ then we
have to overload these
operators.
42 The static data members of a only class only objects both class and none of given A
class can be accessed by objects options
________
43 Classes defined inside other looped nested overloaded none of the given B
classes are called ________ options.
classes
44 Which value is returned by the A pointer to the An object of the A status code Destructors do D
destructor of a class? class. class. determining not return a
whether the class value.
was destructed
correctly
45 Consider the following code Member Non-member Binary operator None of the given B
segment: class M {friend int function function function options
operator!(const M &);}; Let
assume if s is an object of the
class then function is
implemented as ___________
46 When the compiler overloads compiler does compiler does member of the None of the given C
the assignment (=) operator by member wise not allow default class are not options
default then __________ assignment. overload of assigned properly
assignment (=)
operator
47 If text is a pointer of class String Creates an array Creates an array Creates an array Creates a string B
then what is meant by the of 5 string of 5 string of pointers to Object
following statement? objects statically objects string
text = new String [5]; dynamically
48 Static variable which is defined in Only once Every time the Compile time of None of the A
a function is initialized during its life function call the program above
__________. time
49 The appropriate data type to float int char none of the given B
store the number of rows and options.
colums of the matrix
is____________.
50 Copy constructor becomes Dynamic Static memory Both Dynamic and None of the given A
necessary while dealing with memory Static memory options
_______allocation in the class.
51 seekg() and write() are Different Identical Two names of None of the A
functionally _________________ same function above
Safi Khan | Virtual University of Pakistan
24 Computer Science MCQs for NTS / PPSC

52 When a pointer is incremented, According to 1 byte exactly 1 bit exactly A pointer variable A
it actually jumps the number of data type can not be
memory addresses incremented
53 setw is a parameterized True False A
manipulator.
54 eof( ), bad( ), good( ), clear( ) all True False A
are manipulators.
55 In functions that return Local Global Global or static None of the given C
reference, use option
__________variables.
56 The declarator of Plus (+) Class-Name operator Class- operator Class- Class-Name A
member operator function is operator + Name + ( ) Name + ( rhs) operator + ( )
(Class-Name rhs)
57 The compiler does not provide a True False B
copy constructor if we do not
provide it.
58 What is the functionality of the Deletes all the Deletes one Do not delete any Results into C
following syntax to delete an objects of array object of array object syntax error
array of 5 objects named arr
allocated using new operator?
delete arr ;
59 What is the sequence of event(s) Only block of Only constructor Memory is Constructor is D
when allocating memory using memory is is called for allocated first called first before
new operator? allocated for objects before calling allocating
objects constructor memory
60 What is the sequence of event(s) Only block of Only destructor is Memory is Destructor is D
when deallocating memory using memory is called for objects deallocated first called first before
delete operator? deallocated for before calling deallocating
objects destructor memory
61 new and delete operators True False B
cannot be overloaded as
member functions.
62 The operator function of << and True False B
>> operators are always the
member function of a class.
63 A template function must have 0 1 2 3 B
at least ---------- generic data
type
64 If we do not mention any int void double float A
return_value_type with a
function, it will return an _____
value.
65 Suppose a program contains an 0 99 100 101 C
array declared as int arr[100];
what will be the size of array?
66 The name of an array represents True False A
address of first location of array
element.
67 Reusing the variables in program True False A
helps to save the memory
68 Which of the following option is The new Allocates Creates an object All of the given B
true about new operator to operator memory to and calls the options
dynamically allocate memory to determines the object and constructor to
Safi Khan | Virtual University of Pakistan
25 Computer Science MCQs for NTS / PPSC

an object? size of an object returns pointer initialize the


of valid type object
69 new and delete are _____ Functions, Classes, Operators, Operators, classes C
whereas malloc and free are operators operators functions
_____.
70 Which of the following Friend function Friend function Friend function It can be declared D
statement is best regarding must be must be declared must be declared anywhere in class
declaration of friend function? declared after after private at the top within as these are not
public keyword. keyword. class definition. affected by the
public and private
keywords.
71 The operator function Non-member Member function Friend function of None of the given B
overloaded for an Assignment function of class of class class options
operator (=) must be
72 For non-member operator Object of Object of Built-in data type All of the given B
function, object on left side of operator class different class options
the operator may be
73 The operator function will be Member Non-member Friend function None of the given A
implemented as _____, if obj1 function function options
drive the - operator whereas
obj2 is passed as arguments to -
operator in the statement given
below.
obj3 = obj1 - obj2;
74 Which one of the following is the Class-name Class-name Class-name Class-name C
declaration of overloaded pre- operator +() ; operator +(int) ; operator ++() ; operator ++(int) ;
increment operator
implemented as member
function?
75 The static data members of a at file scope within class within member within main B
class are initialized _______ definition function function
76 Class is a user data type memory referee value none of the given A
defined___________. options.
77 We can also define a user- True False A
defines manipulators.
78 Automatic variable are created Heap Free store static storage stack A
on ________.
79 In C/C++ the string constant is In curly braces In small braces In single quotes In double quotes D
enclosed
80 The size of int data type is 1 bytes 2 bytes 3 bytes 4 bytes D
81 In Flow chart process is Rectangle Arrow symbol Oval Circle C
represented by
82 If the break statement is missed The compiler This may cause a No effect on Program stops its C
in switch statement then, will give error logical error program execution
83 When we are using const Must Optional Not necessary A syntax error A
keyword with a variable x then
initializing it at the time of
declaration is,
84 Which of the following is the m[2][3] = 5 ; // m[3][2] = 5 ; m[1][2] = 5 ; m*2+*3+ = 5; A
correct way to assign an integer [row][col]
value 5 to element of a matrix
say m at second row and third
column?
Safi Khan | Virtual University of Pakistan
26 Computer Science MCQs for NTS / PPSC

85 How many total elements must 4 5 6 7 C


be in two-dimensional array of 3
rows and 2 columns?
86 Which of the following is the ptr is a constant ptr is constant ptr is a constant ptr is a pointer to D
correct statement for the pointer integer pointer pointer to int const int
following declaration?
const int *ptr.
87 What will be the correct syntax *ptr = arr ; ptr = arr ; *ptr = arr[5] ; ptr = arr[5] ; A
to assign an array named arr of 5
elements to a pointer ptr?
88 C is a/an ______ language low level object based object oriented function oriented D
89 The variables having a name, True False A
type and size are just like empty
boxes.
90 If Num is an integer variable Add 1 two times Add 1 with Num Add 2 with Num Subtract 2 from B
then Num++ means, with Num
91 If the return type of a function is Return any type Return some Return no data Return just C
void then it means that it will, of data specific type of character data
data
92 Which of the following is a valid class A { int x; }; class B { } public class A { } object A { int x; }; A
class declaration?
93 When we use manipulators in iostream.h stdlib.h stdio.h iomanip.h D
our program then which header
file should be included?
94 We can also create an array of True False A
user define data type.
95 The normal source of cin object File Disk Keyboard RAM C
is,
96 A stream is an ordered sequence True False A
of bytes.
97 We can delete an array of True False A
objects without specifying []
brackets if a class is not doing
dynamic memory allocation
internally.
98 The second parameter of True False A
operator functions for << and >>
are objects of the class for which
we are overloading these
operators.
99 Which looping process checks for while do while no looping C
the test condition at the end of process checks
the loop? the test condition
at the end
100 In a group of nested loops, which the outermost the innermost all loops are cannot be B
loop is executed the most loop loop executed the determined
number of times? same number of without knowing
times the size of the
loops
101 Template class can not have True False B
static variables.
102 i. int arr[2][3] = {4, 8, 9, 2, 1, 6} ; (ii) only (iii) only (ii) and (iii) and (iii) A
ii. int arr[3][2] = {4, 8, 9, 2, 1, 6} ;
Safi Khan | Virtual University of Pakistan
27 Computer Science MCQs for NTS / PPSC

iii. int arr[][2] = {{4,8},{9, 2},{1,


6}} ;
Which of the following option(s)
are correct to initialize a two-
dimensional array with 3 rows
and 2 columns?
103 There is a pointer variable variable of type variable of type variable of type variable of type C
named ptr of type int then char short int double
address of which type of variable
the ptr will store in it?
104 Let suppose 2 4 8 12 C
Union intorDouble{
Int ival;
Double charvar;
};
main(){
intorDouble VAZ;
int size ;
size = sizeof(VAZ);
}
What will be the value of
variable "size", if int occupies 4
bytes and double occupies 8
bytes?
105 new and delete are _____ Functions, Classes, Operators, Operators, classes C
whereas malloc and free are operators operators functions
_____.
106 The member functions of a class separate, each common, all different, each different, all A
occupy _____ region in memory
for ____ object(s) of class.
107 Friend functions are _____ of a Member Public member Private member Private member D
class. functions functions functions functions
108 Which of the following is true Precedence of The parity No new operators Associativity of an A
while overloading operators? an operator can (number of can be created operator can be
be changed operands) can be changed
changed
109 Which of the following option Minus (-) and = the -= operator the - and = Non of given C
will be true to overload the -= operators need need to be operators need to
operator? to be overloaded be overloaded
overloaded explicitly implicitly
110 The input/output streams; cin Operators Functions Objects Structures C
and cout are ____
111 dec, hex, oct are all __________ Member Objects of Parameterized Non- C
functions input/output manipulators parameterized
streams manipulators
112 What will be the output of the 52 34 61 74 B
following statement?
cout << setbase(16) << 52 ;
113 The first parameter of input stream, object of class, output stream, object of class, C
overloaded stream insertion object of class output stream object of class input stream
operator is _________ where
second parameter is _______
114 We can also do conditional True False A
Safi Khan | Virtual University of Pakistan
28 Computer Science MCQs for NTS / PPSC

compilation with preprocessor


directives.
115 With user-defined data type Syntax error Logical error Link error Non of the given B
variables (Objects), self options
assignment can produce
__________.
116 The return type of the operator class for which reference of reference of void C
function for >> operator is we overload this ostream class istream class
________. operator (ostream&) (istream&)
117 When an object of a class is Constructor of Constructor of Constructor and None of the given B
defined inside an other class enclosing class inner object will Destructor will be options
then, will be called be called first called
first simultaneously
118 Where we can include a header any where in start at the end none of the given B
file in the program? options.
119 A function that calls itself is Iterative Inline function Recursive function main () C
known as function
120 The function call to a default looks like any never takes any creates but is made D
constructor function call, arguments cannot initialize automatically
except there is an object when an object is
no return value created
121 Static member functions must be must be declared have multiple can access only D
declared inside private copies for the static data
the class entire class
definition, but
defined outside
it
122 The reserved words public and structures strings accessibility types of functions C
private comes under the modifiers
category
123 A for loop usually consist of 1 2 3 4 C
__________ expressions.
124 A preprocessor directive is # { ( ~ A
identified by _________ symbol
125 Which of the following operators new delete += sizeof D
can not be overloaded?
126 A function declaration has the a class definition an object a variable has to a a variable A
same relationship to a function has to an object declaration has variable declaration has to
definition that definition to an object declaration the variable itself
127 When we write a class template template < class template < class template < class T class class-name() C
the first line must be: class_type> data_type> >, Here T can be
replaced with any
name but it is
preferable.
128 A friend function of a class has To all data Only to other Only to private Only to public A
access member and friend functions data of the class data of the class
functions of the of the class
class
129 The new operator is used to can not create can allocate an returns an C
declare objects and initialize an appropriate address to an
or variables object amount of object or variable
memory for an
object or variable
Safi Khan | Virtual University of Pakistan
29 Computer Science MCQs for NTS / PPSC

130 If we open a file stream myfile tellg() tellp() seekg() seekp() A


for reading, what will give us the
current position of the file
pointer?
131 There is a class Student, Which Student(); Student(int); ~ Student(); ~ Student(int); C
one of the following is a valid
destructor for this class.
132 A copy constructor creates an creates a new creates a new takes an arbitrary B
object initialized object that later object that later number of
with the same may be assigned may be assigned arguments
data as an the data of an the data of an
existing object existing object existing object
133 To access the 8th element of an int[8] int[7] myArray[7] myArray[8] C
int array named myArray of 15
elements, you would write
134 A copy constructor is always an object is an object is an object is an object is not A
called when initialized with initialized with initialized with a initialized when
another object another object of variable of a basic its created
data of the same any class when type when its
class when its its created created
created
135 Constructor is itself a class , can be function , cannot function, can be object, can not be C
__________ of C++ and overloaded be overloaded overloaded initialized
___________.
136 The stream insertion and Built-in data User-defined Both built-in and None of the given B
extraction operators are not types data types user-defined options
already overloaded for ______ types
137 Look at the statement given Compiler will Compiler will Null value will be Compiler will D
below int & a; and tell what will compile show a warning assigned to a generate an
happen ? successfully to you error: a' declared
as reference but
not initialized
138 C++ provides member functions, True False B
which control the formatting to
be performed during stream I/O
operations.
139 The function will return a garbage dangling wastage of system crash B
reference to the global variable collection reference. memory
that exists throughout the
program and thus there will be
no danger of _______________.
140 If an array has 50 elements, what 0 49 1 49 0 50 1 50 A
is allowable range of subscripts?
141 char name *+ = Hello World ; In 13 12 11 10 C
the above statement, a memory
of _________ characters will be
allocated
142 The destructor is used to allocate memory allocate memory create objects allocate static B
______________. memory
143 The first parameter of operator Must be passed Must be passed Can be passed by Must be object of B
function for << operator by value by reference value or reference class
_________________.
144 Array is a data structure which Memory Variables Data Type Data A
Safi Khan | Virtual University of Pakistan
30 Computer Science MCQs for NTS / PPSC

store addresses
145 In C/C++ if we define an array of Arr[0] Arr[8] Arr[7] Arr[-1] C
size eight (8) i.e. int Arr [8]; then
the last element of this array will
be stored at,
146 When an array is passed to a By data By reference By value By data type B
function then default way of
passing this array is,
147 When we define an array of Destructor will Destructor will Destructor will Depends on the B
objects then, call once for call for each never call size of array
whole array object of the
array
148 What is the sequence of event(s) Only block of Only constructor Memory is Constructor is C
when allocating memory using memory is is called for allocated first called first before
new operator? allocated for objects before calling allocating
objects constructor memory
149 We can delete an array of True False B
objects without specifying []
brackets if a class is not doing
dynamic memory allocation
internally.
150 The second parameter of True False A
operator functions for << and >>
are objects of the class for which
we are overloading these
operators.
151 Which of the following is correct int x ; x = 10 ; int x = 10 ; int x, x = 10; x = 10 ; B
way to initialize a variable x of
int type with value 10?
152 Default mechanism of function Call by value, Call by referene, Call by reference, Call by value, call C
calling in case of array is _____ call by reference call by reference call by value by value
and in case of variable is ___.
153 What does STL stand for? Source template Standard Stream template Standard B
library template library library temporary library
154 ________. Paying attention Think about the Think about user All of the given D
to detail reusability interface options
155 For which array, the size of the int double float char D
array should be one more than
the number of elements in an
array?
156 Friend functions are _____ of a Member Public member Private member Non-member D
class functions functions functions functions
157 If overloaded plus operator is obj2 will be obj1 will drive Both objects Any of the objects A
implemented as non-member passed as an the + operator (obj1, obj2) will be (obj1, obj2) can
function then which of the argument to + whereas obj2 will passed as drive the +
following statement will be true operator be passed as an arguments to the operator
for the statement given below? whereas obj2 argument to + + operator
obj3 = obj1 + obj2 ; will drive the + operator
operator
158 For cin, the source is normally a File, native data Disk, user-define Keyboard, variable File, user-define C
________ and destination can be type type type
______.
159 The programs, in which we Heap System Cache None of the given Stack D
Safi Khan | Virtual University of Pakistan
31 Computer Science MCQs for NTS / PPSC

allocate static memory, run options


essentially on ________
160 The default value of a parameter function function both function none of the given B
can be provided inside the prototype definition prototype or options.
________________ function definition
161 While calling function, the left to right. right to left no specific order none of the given C
arguments are assigned to the is followed options.
parameters from
_____________.
162 When an operator function is Zero One Two N arguments D
defined as member function for
a binary Plus (+) operator then
the number of argument it take
is/are.
163 With user-defined data type Syntax error Logical error Link error Non of the given B
variables (Objects), self options
assignment can produce
__________.
164 Assignment operator is used to True False A
initialize a newly declared object
from existing object.
165 In the member initializer list, the From left to From right to left In the order in None of the given C
data members are initialized, right which they are options
defined within
class
166 new operator allocates memory A pointer A reference An integer A float A
from free store and return
_____________.
167 "new" and "delete" keywords Built-in- Operators Memory None of the given C
are _____________ in C++ Function Allocation options
language. Function
168 We can also use member True False B
functions with cin and cout
objects
169 If the statements The values of j The addresses of The addresses of j garbage values D
int j,k; and k q and r and k
j = 123;
k= 234;
int* q, * r;
cout < < *q < < ' ' < < * r ;
are executed, what will be
displayed?
170 Which one of the following OR ( || ) AND ( &&) XOR ( ^ ) Complement D
operators is a unary operator? operator ( ~ )
171 The statement i++; is equivalent i = i + i; i = i + 1; 3) : i = i - 1; i --; B
to
172 A variable which is defined inside Automatic Global variable Functional None of the given C
a function is called variable variable option
173 Application Softwares are use to Type letters Control Solve end user Develop Graphics C
computer problems
hardware
174 When a macro takes arguments Function Procedure Parameterized Simple macro C
then it is macro
Safi Khan | Virtual University of Pakistan
32 Computer Science MCQs for NTS / PPSC

called_________________.
175 By default an array of characters True False B
is passed by value to a function,
176 Using dynamic memory is more True False A
efficient then the static memory.
177 Using dynamic memory is more Costly Expansive Efficient Difficult C
_____________ then the static
memory.
178 Before exiting the program, True False A
make sure that the allocated
memory has freed.
179 The default constructor has no True False A
arguments
180 The data members of the class True False A
are initialized at runtime
181 The data members of the class True False B
are initialized at creation Time
182 Explicitly write keyword private True False A
in the class definition
183 this is a pointer which always True False A
points to the current object.
184 The function free() returns back stack heap stack and heap None of the given B
the allocated memory got options
thorough calloc and malloc to
_____ .
185 Whenever new operator is used, True False A
no number of bytes or sizeof
operator is required.
186 If the memory in the free store is True False B
not sufficient enough to fulfill
the request, malloc() function
returns NO pointer.
187 A friend function must be having can access the cannot access the must be invoked B
a prototype with private data of data members of by the class that
no arguments the class that a class declares it a
declares it a friend
friend
188 Operator Overloading is quite True False A
similar to Function Overloading.
189 There are two types of operators True False A
to overload: unary and binary.
190 The declarator of Minus(-) Class-Name operator Class- operator Class- Class-Name A
member operator function is operator - Name - ( ) Name - ( rhs) operator - ( )
(Class-Name rhs)
191 Operator functions written as True False A
non-members but friends of the
class, get both the operands as
their arguments.
192 We cannot do arithmetic with True False A
references like pointers.
193 In functions that return True False A
reference, use global or static

Safi Khan | Virtual University of Pakistan


33 Computer Science MCQs for NTS / PPSC

variables.
194 In functions that return True False B
reference, use only static
variables.
195 The reference data types are True False A
used as ordinary variables
without any dereference
operator.
196 We can create a new operator True False B
through operator overloading.
197 In overloading the assignment Right object of Left object of the Both objects will No object will call C
(=) operator, which object will the assignment assignment call the the assignment
call the operator function? operator operator assignment operator
operator
198 Which statement about operator New operators Certain The precedence of Overloading B
overloading is false? can never be overloaded an operator cannot change
created operators can cannot be how an operator
change the changed by works on built-in
number of overloading. types.
arguments they
take.
199 Initializing the data members in syntax error logical error not an error none of the given B
the definition of the class is options
___________
200 When an array of object is True False A
created dynamically then there
is no way to provide
parameterized constructors for
array of objects.
201 If we define an identifier with can not be None of the Remain constant can be changed C
the statement #define PI replaced given options by some
3.1415926 then during the operation
execution of the program the
value of PI __________.
202 The default constructor is True False A
defined by the C++ compiler
automatically for every class that
has no default constructor
(parameterless constructor)
defined already.
203 The default constructor True False A
(parameterless constructor) is
called for each element in the
array allocated with new.
204 The new operator returns a Type True False B
*, accepts a parameter of type
size_t.
205 The new operator returns a void True False A
*, accepts a parameter of type
size_t.
206 The delete operator returns True False A
nothing (void) and accepts a
pointer of void * to the memory
Safi Khan | Virtual University of Pakistan
34 Computer Science MCQs for NTS / PPSC

block.
207 The delete operator returns True False B
nothing (void) and accepts a
pointer of type * to the memory
block.
208 By overloading new and delete True False A
operators, only allocation and
deallocation part can be
overridden.
209 new and delete can overload in True False B
c++
210 By overloading the array True False A
operator ( [] ), one can
implement mechanism to check
for array bound.
211 Stream insertion ( << ) and Member non-member Inside Out Side B
extraction operators ( >> ) are
always implemented as
___________ functions.
212 For operator >>, the second True False A
parameter must also be passed
by reference.
213 A copy constructor takes no copies the data creates an object creates a new C
arguments of any two initialized with the object that later
constructors in same data as an may be assigned
that class existing object the data of an
existing object
214 A class can contain instances of True False A
other classes as its data
members.
215 The inner data members of the True False A
object are constructed and then
the object itself.
216 The order of destruction of an True False B
object is equle to this
construction order, where the
outer object is destroyed first
before the inner data members.
217 Initializer list is used to initialize True False A
the inner objects at the
construction time.
218 In C++, we can have structures or nested Child Parent Branch A
classes defined inside classes.
Classes defined within other
classes are called ________
classes.
219 The template functions do NOT True False B
promote the code reuse
220 It is possible to define a class True False A
within another class.
221 When ever dynamic memory Explicitly Implicitly Both explicitly and None of the given A
allocation is made in C/C++, it is implicitly options
freed_____________.
Safi Khan | Virtual University of Pakistan
35 Computer Science MCQs for NTS / PPSC

222 User-defined manipulators are True False A


allowed in c++.
223 It is a way of reusing the code True False A
when we contain objects of our
already written classes into a
new class,
224 Structured Query Language is Databases Networks Writing Operating none of the given A
used for ______________ Management System options
225 In if structure the block of Type letters When it contain When it contain When the D
statements is executed only, arithmetic logical operators condition is true
operators
226 Loader transfers the executable True False B
code from main memory to hard
disk.
227 When break statement is Stops the entire Stops the Exits from switch None of the given C
encountered in switch program execution of statement options
statement, it current
statement

Safi Khan | Virtual University of Pakistan


36 Computer Science MCQs for NTS / PPSC

CS301-Data Structures
ID Qus A B C D A
n
s
1 A solution is said to be True False A
efficient if it solves the
problem within its
resource constraints i.e.
hardware and time
2 Which one of the following Linked List Stack Queue Tree B
is known as "Last-In, First-
Out" or LIFO Data
Structure?
3 What will be postfix ab+c*d- abc*+d- abc+*d- abcd+*- B
expression of the following
infix expression? Infix
Expression : a+b*c-d
4 For compiler a postfix True False A
expression is easier to
evaluate than infix
expression?
5 declare a stack of selpa selppa apples aaappppplleess B
characters, while ( there
are more characters in the
word to read ){read a
character; push the
character on the stack;}
while ( the stack is not
empty ){pop a character
off the stack; write the
character to the screen;}
input "apples"?
6 Consider the following 42 024 02 24 A
function: void test_a(int n)
{cout << n << " "; if (n>0)
test_a(n-2); } What is
printed by the call
test_a(4)?
7 If there are N external N -1 N +1 N+2 N A
nodes in a binary tree then
what will be the no. of
internal nodes in this
binary tree?
8 If there are N internal N -1 N +1 N+2 N B
nodes in a binary tree then
what will be the no. of
external nodes in this
binary tree?
9 If we have 1000 sets each Reflexive Symmetric Transitive Associative A
containing a single
different person. Which of
the following relation will

Safi Khan | Virtual University of Pakistan


37 Computer Science MCQs for NTS / PPSC

be true on each set:


10 Which one of the following Reflexive Symmetric Transitive Associative D
is NOT the property of
equivalence relation
11 A binary tree of N nodes Log10 N levels Log2 N levels N / 2 levels N x 2 levels B
has _______
12 The easiest case of Is a leaf node Has left subtree Has right subtree Has both left and A
deleting a node from BST only only right subtree
is the case in which the
node to be deleted
___________
13 If there are N elements in N N^2 Nlog2N log2N D
an array then the number
of maximum steps needed
to find an element using
Binary Search is _______
14 Merge sort and quick sort O(nlogn) sorts Interchange sort Average time is None of the given D
both fall into the same quadratic options
category of sorting
algorithms. What is this
category?
15 If one pointer of the node External node Root node Inner node Leaf node A
in a binary tree is NULL
then it will be a/an
_______
16 We convert the ________ Left Right NULL None of the given C
pointers of binary to options
threads in threaded binary
tree
17 If the bottom level of a Expression tree Threaded binary complete Binary Perfectly complete C
binary tree is NOT tree tree Binary tree
completely filled, depicts
that the tree is NOT a
18 What is the best definition Two entries are Two entries with Two entries with Two entries with C
of a collision in a hash identical except for different data have different keys have the exact same
table? their keys the exact same key the same exact key have different
hash value hash values
19 Suppose that a selection 21 41 42 43 C
sort of 100 items has
completed 42 iterations of
the main loop. How many
items
are now guaranteed to be
in their final spot (never to
be moved again )
20 Suppose you implement a 16, 18, 20, 22, 24, 16, 20, 18, 24, 22, 16, 24, 18, 28, 30, 16, 24, 20, 30, 28, D
Min heap (with the 28, 30 30, 28 20, 22 18, 22
smallest element on top)
in an array. Consider the
different arrays
below; determine the one
that cannot possibly be a
heap:

Safi Khan | Virtual University of Pakistan


38 Computer Science MCQs for NTS / PPSC

21 Which of the following A find(x) on A find(x) on A find(x) on A find(x) on B


statement is correct about element x is element x is element x is element x is
find(x) operation performed by performed by performed by performed by
returning exactly returning the root returning the returning TRUE
the same node of the tree whole tree itself
that is found containing x containing x
22 Which of the following It is not a One idea might be Initially each set Initially each set B
statement is NOT correct requirement that a to use a tree to contains one contains one
about find operation find operation represent each set, element element and it
returns any specific since each element does not make
name, just that in a tree has the sense to make a
finds on two same root, tree of one node
elements thus the root can only
return the same be used to name
answer if and only the set
if they are in the
same set
23 In complete binary tree Left to right Right to left Not filled at all None of the given A
the bottom level is filled options
from ________
24 Here is an array of ten 0389175264 2640389175 2649170385 0382649175 A
integers: 5 3 8 9 1 7 0 2 6 4
The array after the FIRST
iteration of the large loop
in a selection sort (sorting
from smallest to largest)
25 What requirement is The array elements The array must The array must be The arrays size C
placed on an array, so that must form a heap have at least 2 sorted must be a power
binary search may be used entries of two
to locate an entry?
26 Which one of the following Push Pop Top First C
operations returns top
value of the stack?
27 Compiler uses which one Stack Queue Binary Search Tree AVL Tree A
of the following in
Function calls,
28 Every AVL is Binary Tree Complete Binary None of these Binary Search Tree D
_____________ Tree
29 If there are 56 internal 54 55 56 57 D
nodes in a binary tree then
how many external nodes
this binary tree will have?
30 If there are 23 external 21 22 23 24 B
nodes in a binary tree then
what will be the no. of
internal nodes in this
binary tree?
31 Which one of the following Electrical Set of people <= relation Set of pixels C
is not an example of connectivity
equivalence relation?
32 Binary Search is an Sorted Unsorted Heterogeneous Random A
algorithm of searching,
used with the ______ data

Safi Khan | Virtual University of Pakistan


39 Computer Science MCQs for NTS / PPSC

33 Which one of the following Each list Si contains List S0 contains the Each list is a List Sh contains D
is NOT true regarding the the special keys + keys of S in non- subsequence of only the n special
skip list? infinity and - decreasing order the previous one keys
infinity
34 A simple sorting algorithm O(1) time because O(n) time because O(n2) time O(n3) time, C
like selection sort or all lists take the it has to perform n because sorting 1 because the worst
bubble sort has a worst- same amount of swaps to order the element takes O(n) case has really
case of time to sort list time - After 1 pass random input
through the which takes longer
list,either of these to sort
algorithms can
guarantee that 1
element is sorted
35 Which of the following is a A binary tree of N A binary tree of N A binary tree of N A binary tree of N B
property of binary tree? external nodes has internal nodes has external nodes has internal nodes has
N internal node N+ 1 external node N+ 1 internal node N- 1 external node
36 By using __________we Binary tree only Threaded binary Heap data Huffman encoding B
avoid the recursive tree structure
method of traversing a
Tree, which makes use of
stacks and consumes a lot
of memory and time
37 Which of the following This dummy node This dummy node This dummy node This dummy node C
statement is true about never has a value has always some has either no value has always some
dummy node of threaded dummy value or some dummy integer value
binary tree? value
38 For a perfect binary tree of N (h 1) N (h + 1) N1 N1+h B
height h, having N nodes,
the sum of heights of
nodes is
40 Which formula is the best log (base 2) of n The number of The square root of n A
approximation for the digits in n (base n
depth of a heap with n 10), e.g., 145 has
nodes? three digits
41 Which of the following It is not a One idea might be Initially each set Initially each set B
statement is NOT correct requirement that a to use a tree to contains one contains one
about find operation: find operation represent each set, element element and it
returns any specific since each element does not make
name, just that in a tree has the sense to make a
finds on two same root, thus tree of one node
elements the root can be only
return the same used to name the
answer if and only set
if they are in the
same set
42 Which of the following is Randomly remove Removing a wall is Remove a Do not remove a C
not true regarding the walls until the the same as doing randomly chosen randomly chosen
maze generation? entrance and exit a union operation wall if the cells it wall if the cells it
cells are in the separates are separates are
same set already in the already in the
same set same set
43 In threaded binary tree the preorder successor inorder successor postorder NULL pointers are B
NULL pointers are replaced or predecessor or predecessor successor or not replaced

Safi Khan | Virtual University of Pakistan


40 Computer Science MCQs for NTS / PPSC

by predecessor
44 Which of the given option Maintain sizes Make smaller tree, Make the larger Implementation: C
is NOT a factor in Union by (number of nodes) the subtree of the tree, the subtree of for each root node
Size: of all trees, and larger one the smaller one i, instead of
during union setting parent[i] to
-1, set it to -k if
tree rooted at i
has k
nodes
45 Suppose we had a hash 143 144 145 148 A
table whose hash function
is n % 12, if the number
35 is already in the hash
table,
which of the following
numbers would cause a
collision?
47 A binary tree with 24 22 23 25 48 C
internal nodes has ______
external nodes
48 In case of deleting a node Yes No A
from AVL tree, rotation
could be prolong to the
root node
49 when we have declared Declaration Execution Defining None of the abov B
the size of the array, it is
not possible to increase or
decrease it during the
________of the program
50 it will be efficient to place Variable Constant Inconsistent None of the above B
stack elements at the start
of the list because
insertion and removal take
_______time
51 _______ is the stack isFull(),isEmpty() pop(), push() isEmpty() , isFull() push(),pop() C
characteristic but
_______was implemented
because of the size
limitation of the array
52 What kind of list is best to Lists implemented Doubly-linked lists Singly-linked lists Doubly-linked or A
answer questions such as with an array singly-linked lists
"What is the item at are equally best
position n?"
53 Each node in doubly link 1 2 3 4 B
list has________pointer(s)
55 A binary tree with N N+1, 2N, N-1 N+1, N-1, 2N 2N, N-1, N+1 N-1, 2N, N+1 C
internal nodes has _____
links, _______ links to
internal nodes and
________ links to external
nodes
56 The definition of For all element x For all elements x For all elements x, For all elements C
Transitivity property is member of S, x R x and y, x R y if and y and z, if x R y and w, x, y and z, if x R

Safi Khan | Virtual University of Pakistan


41 Computer Science MCQs for NTS / PPSC

only if y R x y R z then x R z y and w R z then x


Rz
57 Union is a _______ time Constant Polynomial Exponential None of the given A
operation options
58 Huffman encoding uses Linked list Stack Queue Binary tree D
_________ tree to develop
codes of varying lengths
for the letters used in the
original message
59 Consider a min heap, 10,30,20,31,40,50, 10,30,20,70,40,50, 10,31,20,30,40,50, 31,10,30,20,70,40, A
represented by the 80,60,70 80,60,31 80,60,31 50,80,60
following array:
10,30,20,70,40,50,80,60
After inserting a node with
value 31.Which of the
following is the updated
min heap?
60 Consider a min heap, 11,22,33,44,55,66 11,22,33,44,66,55 11,22,33,66,44,55 11,22,66,33,44,55 A
represented by the
following array:
11,22,33,44,55
After inserting a node with
value 66.Which of the
following is the updated
min heap?
61 _________ is a data Array () List Both of these None of these C
structure that can grow
easily dynamically at run
time without having to
copy existing elements
62 The maximum number of 2^H 2^H +1 2^H -1 2^H +2 A
external nodes (leaves) for
a binary tree of height H is
_________
63 A complete binary tree of 2 3 4 5 C
height ____ has nodes
between 16 to 31
64 Which of the given option Maintain sizes Make smaller tree, Make the larger Implementation: C
is NOT a factor in Union by (number of nodes) the subtree of the tree, the subtree of for each root node
Size of all trees, and larger one the smaller one i, instead of
during union setting parent[i] to
-1, set it to -k if
tree rooted at i
has k
nodes
65 Suppose A is an array the first the second may find first or None of the given A
containing numbers in occurrence of a occurrence of a second occurrence options
increasing order, but some value value of a value
numbers occur more than
once when using a binary
search for a value, the
binary search always finds
____________

Safi Khan | Virtual University of Pakistan


42 Computer Science MCQs for NTS / PPSC

67 + is a Unary Binary Ternary None of the above B


_________operator
68 A kind of expressions Postfix Infix Prefix None of the above B
where the operator is
present between two
operands called
________expressions
69 void f(int i, int &k) {i = 1;k = Both x and y are x is now 1, but y is x is still 0, but y is x is now 1, and y is C
2; } Suppose that a main still 0 still 0 now 2 now 2
program has two integer
variables x and y, which
are given the value 0. Then
the main program calls
f(x,y); What are the values
of x and y ?
70 If you know the size of the Array List Both of these None of these C
data structure in advance,
i.e., at compile time, which
one of the following is a
good data structure to use
71 If a complete binary tree Log (h) 2^(h+1)- 1 Log (h) - 1 2^h - 1 B
has height h then its no. of
nodes will be,
72 If a max heap is data[0] data[n-1] data[n] data[2*n+1] A
implemented using a
partially filled array called
data, and the array
contains n elements (n >
0), where is the entry with
the greatest value?
73 Which one is a self- Stack Queue Link list All of these C
referential data type?
74 There is/are ________ 1 2 3 4 D
case/s for rotation in an
AVL tree,
75 Which of the following can Pixel intensity Texture Threshold of All of the given D
be the inclusion criteria for intensity options
pixels in image
segmentation
76 Consider te following array Heap sort Selection sort Insertion sort Bubble sort D
23 15 5 12 40 10 7
After the first pass of a
particular algorithm, the
array looks like 15 5 12 23
10 7 40
Name the algorithm used
77 In a perfectly balanced One rotation Two rotations Rotations equal to No rotation at all A
tree the insertion of a number of levels
node needs ________
79 Which of the following is In a table, the type A table consists of The row of a table A major use of B
NOT a correct statement of information in several columns, is called a record table is in
about Table ADT columns may be known as entities databases where
different we build and use

Safi Khan | Virtual University of Pakistan


43 Computer Science MCQs for NTS / PPSC

tables for keeping


information
80 If both pointers of the Inner node Leaf node Root node None of the given B
node in a binary tree are options
NULL then it will be a/an
_______
81 Suppose we are sorting an The pivot could be The pivot could be The pivot is not the Neither the 7 nor A
array of eight integers either the 7 or the the 7, but it is not 7, but it could be the 9 is the pivot
using quick sort, and we 9 the 9 the 9
have just finished the first
partitioning with the array
looking like this: 2 5 1 7 9
12 11 10
Which statement is
correct?
82 A binary tree with 33 31 32 33 66 B
internal nodes has
_______ links to internal
nodes
83 The _______ method of Remove Next Start Back C
list will position the
currentNode and
lastCurrentNode at the
start of the list
84 Mergesort makes two Elements in the None of the given The array elements Elements in the D
recursive calls. Which first half of the options form a heap second half of the
statement is true after array are less than array are less than
these recursive calls finish, or equal to or equal to
but before the merge elements in the elements in the
step? second half of the first half of the
array array
85 The arguments passed to a True False A
function should match in
number, type and order
with the parameters in the
function definition
86 If numbers 5, 222, 4, 48 48 4 222 5 D
are inserted in a queue,
which one will be removed
first?
87 Suppose currentNode currentNode ++; currentNode = currentNode += currentNode = D
refers to a node in a linked nextNode; nextNode; currentNode-
list (using the Node class >nextNode;
with member variables
called data and nextNode).
What statement changes
currentNode so that it
refers to the next node?
88 A Compound Data Arrays LinkLists Binary Search All of the given D
Structure is the data Trees options
structure which can have
multiple data items of
same type or of different

Safi Khan | Virtual University of Pakistan


44 Computer Science MCQs for NTS / PPSC

types. Which of the


following can be
considered compound
data structure?
89 The difference between a a binary search in binary search in binary tree none of these A
binary tree and a binary tree has two tree nodes are nodes are inserted
search tree is that children per node inserted based on based on the
whereas a binary the values they values they contain
tree can have contain
none, one, or two
children per node
90 Compiler uses which one Binary Tree Binary Search Tree Parse Tree AVL Tree C
of the following to
evaluate a mathematical
equation
91 Which of the following insert add update preculateDown D
method is helpful in
creating the heap at once?
92 A complete binary tree of 8 to 14 8 to 15 8 to 16 8 to 17 B
height 3 has between
________ nodes
93 Consider a min heap, 3,4,6,7,5,10,1 3,4,6,7,5,1,10 3,4,1,5,7,10,6 1,4,3,7,5,10,6 D
represented by the
following array:
3,4,6,7,5,10
After inserting a node with
value 1.Which of the
following is the updated
min heap?
94 Which one of the following Bubble Sort Insertion Sort Quick Sort Merge Sort C
algorithms is most widely
used due to its good
average time
95 We are given N items to N-1 N N+1 N^2 B
build a heap, this can be
done with _____
successive inserts
96 __________ only removes Stack Queue Both of these None of these A
items in reverse order as
they were entered
97 Select the one FALSE Every binary tree Every non-empty Every node has at Every non-root A
statement about binary has at least one tree has exactly most two children node has exactly
trees node one root node one parent
98 Searching an element in an 1.44 Log2n 1.66 Log2n Log2(n+1) Log2(n+1) -1 A
AVL tree take maximum
_______ time (where n is
no. of nodes in AVL tree),
99 Suppose you implement a 7364251 7643521 7362145 7654321 A
heap (with the largest
element on top) in an
array. Consider the
different arrays below,
determine the one that

Safi Khan | Virtual University of Pakistan


45 Computer Science MCQs for NTS / PPSC

cannot possibly be a heap


100 In the worst case of Only one rotation Rotation at each Rotation at each Rotations equal to D
deletion in AVL tree non-leaf node leaf node log2 N
requires _________
101 Which of the following A Threaded Binary A Threaded Binary A Threaded Binary A Threaded Binary C
statement is correct? Tree is a binary Tree is a binary Tree is a binary Tree is a binary
tree in which every tree in which every tree in which every tree in which
node that does not node that does not node that does not every node that
have a left child have a right child have a right child does not have a
has a THREAD (in has a THREAD (in has a THREAD (in right child has a
actual sense, a actual sense, a actual sense, a THREAD (in actual
link) to its link) to its link) to its sense, a link) to its
INORDER successor PREOREDR INORDER successor POSTORDER
successor successor
102 Which of the following Right thread of the Left thread of the The left pointer of Left thread of the D
statement is NOT true right-most node left-most node dummy node right-most node
about threaded binary points to the points to the points to the root points to the
tree? dummy node dummy node node of the tree dummy node
103 Consider a min heap, 4,6,7,5 6,7,5,4 4,5,6,7 4,6,5,7 C
represented by the
following array: 3,4,6,7,5
After calling the function
deleteMin().Which of the
following is the updated
min heap?
104 We can build a heap in Linear Exponential Polynomial None of the given A
________ time options
105 While joining nodes in the Randomly That occur first in That are lexically That are lexically A
building of Huffman the text message smaller among greater among
encoding tree if there are others others
more nodes with same
frequency, we choose the
nodes _______
106 ... is a linear list (i) queue (ii) (i) stack (ii) (i) stack (ii) (i) tree (ii) C
where and insertion (iii) insertion (iii) insertion (iii) insertion (iii)
take place at the same end removals (iv) top removals (iv) removals (iv) top removals (iv) top
. This end is called the bottom
..
What would be the correct
filling the above blank
positions?
107 Which traversal gives a post-order level-order inorder None of the given D
decreasing order of options
elements in a heap where
the max element is stored
at the top?
108 Which of the following is a Linked List Stack Queue Tree D
non linear data structure?
109 The data of the problem is Use better data Increase the hard Use the better Use as much data B
of 2GB and the hard disk is structures disk space algorithm as we can store on
of 1GB capacity, to solve the hard disk
this problem we should
110 In an array list the current The first element The middle The last element The element A

Safi Khan | Virtual University of Pakistan


46 Computer Science MCQs for NTS / PPSC

element is element where the current


pointer points to
111 In sequential access data Arrays Lists Both of these None of these B
structure, accessing any
element in the data
structure takes different
amount of time.
Tell which one of the
following is sequential
access data structure
112 I have implemented the (last % 1) + last % (1 + (last + 1) % last + (1 % C
queue with a circular CAPACITY CAPACITY) CAPACITY CAPACITY)
array. If data is a circular
array of CAPACITY
elements, and last
is an index into that array,
what is the formula for the
index after last?
113 Which one of the following Recursion Threaded Binary Recursive function Iteration is more A
is TRUE about recursion? extensively uses Trees use the calls consume a lot efficient than
stack memory concept of of memory iteration
recursion
115 Which one of the following Iteration Threaded Binary Iterative function Recursion is more A
is TRUE about iteration? extensively uses Trees use the calls consumes a efficient than
stack memory concept of lot of memory iteration
iteration
116 Which of the following increaseKey(p,delt decreaseKey(p,delt preculateDown(p,d remove(p,delta) A
heap method increase the a) a) elta)
value of key at position p
by the amount delta?
117 If we have 1000 sets each Reflexive Symmetric Transitive Associative A
containing a single
different person. Which of
the following relation will
be true on each set
118 Which of the following A binary tree with A binary tree with A binary tree with None of above C
statements is correct N internal nodes N external nodes N internal nodes statement is a
property of binary trees? has N+1 internal has 2N internal has N+1 external property of the
links nodes nodes binary tree
119 In a selection sort of n n-1 n log n n2 1 A
elements, how many times
the swap function is called
to complete the execution
of the algorithm?
120 Consider the following -1 1 0 2 B
postfix expression S and
the initial values of the
variables. S = A B - C + D E
F - + ^ Assume that A=3,
B=2, C=1, D=1, E=2, F=3
What would be the final
output of the stack?
122 Which of the following To perform Union To perform Union perform Union of None of the given A

Safi Khan | Virtual University of Pakistan


47 Computer Science MCQs for NTS / PPSC

statement is correct about of two sets, we of two sets, we two sets, merging options
union? merge the two merge the two operation of trees
trees by making trees by making in not required at
the root of one the leaf node of all
tree point to the one tree point to
root of the other the root of the
other
123 Let heap stored in an array [50,32, 37,13, 28, [37, 28, 32, 22, 36, [37, 36, 32, 28, 13, [37, 32, 36, 13, 28, A
as H = [50, 40, 37, 32, 28, 22, 36] 13] 22] 22]
22, 36, 13]. In other words,
the root of the heap
contains the maximum
element. What is the
result of deleting 40 from
this heap
124 In an array we can store True False B
data elements of different
types
125 Which one of the following In linked list the In linked list the In linked list each In an array the B
statement is NOT correct elements are elements may element also has elements are
necessarily to be locate at far the address of the contiguous
contiguous positions in the element next to it
memory
126 Doubly Linked List always True False B
has one NULL pointer
128 A queue is a data structure inserted at the inserted and inserted at the inserted and A
where elements are front and removed removed from the back and removed removed from
from the back top from the front both ends
129 Each node in doubly link 1 pointer 2 pointers 3 pointers 4 pointers B
list has
130 I have implemented the Neither changes Only front pointer Only rear pointer Both change B
queue with a linked list, changes changes
keeping track of a front
pointer and a rear pointer.
Which of these pointers
will change during an
insertion into an EMPTY
queue?
131 If a complete binary tree Log2 (n+1) -1 2n Log2 (n) - 1 2n - 1 A
has n number of nodes
then its height will be
132 If a complete binary tree Log (h) 2^(h+1) - 1 Log (h) - 1 2^h - 1 B
has height h then its no. of
nodes will be
133 A binary relation R over S Reflexivity Symmetry Transitivity All of the given D
is called an equivalence options
relation if it has following
property(s)
134 Use of binary tree in Traversal Heap Union Huffman encoding D
compression of data is
known as _______
135 While building Huffman Equal to the small Equal to the Equal to the sum of Equal to the C
encoding tree the new frequency greater the two difference of the
Safi Khan | Virtual University of Pakistan
48 Computer Science MCQs for NTS / PPSC

node that is the result of frequencies two frequencies


joining two nodes has the
frequency
137 A Threaded Binary Tree is Inorder levelorder Preorder Postorder A
a binary tree in which
every node that does not
have a right child has a
THREAD (in actual sense, a
link) to its __________
successor
138 A complete binary tree is a partially completely incompletely partly B
tree that is _________
filled, with the possible
exception of the bottom
level
139 Consider the following x y -a * b +c / x *y a - b c / + xya*-bc/+ x y a * - b/ + c C
infix expression: x y * a +
b / c
Which of the following is a
correct equivalent
expression(s) for the
above?
140 In a min heap, left, right Right, left Up, down Down, up C
preculateDown procedure
will move smaller
value______ and bigger
value______
141 When an array of object is True False A
created dynamically then
there is no way to provide
parameterized
constructors for array of
objects
142 Reference is not really an a synonym an antonym a value a number A
address it is
______________
143 Which of the following Source Template Destination State B
concept is NOT associated
with stream?
144 To get the memory & % * $ A
address of a variable we
use ____
145 Class is a user data type memory reference value none of the given A
defined___________ options
146 The compiler generates member functions classes objects of a class constructors D
__________________
automatically
147 In_________, we try to Analysis Design Coding None of the given A
have a precise problem
statement
148 From the following; which float [5] name; name[5] float; float name[5]; None of the given D
on is the correct syntax of options
an array declaration: array
Safi Khan | Virtual University of Pakistan
49 Computer Science MCQs for NTS / PPSC

size is 5 and it is of float


data type?
149 For the inorder traversal of left most Root right most any of the given A
threaded binary tree, we node
introduced a dummy node.
The left pointer of the
dummy node is pointing to
the ________ node of the
tree
150 When a complete binary 2i-1 2i 2i+1 floor(i/2) D
tree, represented by an
array then for any array
element at position i, the
parent is at position
______
151 Consider a binary tree, Yes No B
represented by the
following array:
A,B,C,D,E,F,G,H,I,J,K,L Is it
a strictly binary tree?
152 A queue where the de- True False A
queue operation depends
not on FIFO, is called a
priority queue
153 Consider the function X as a = X (b) ; a = X (&b) ; a = X (*b) ; None of the given B
under options
int X (int& Value)
{
return Value;
}
Now a and b are integers
in a calling function. Which
one of the following is a
valid call to the above
function
X
154 In the call by value True False A
methodology, a copy of
the object is passed to the
called function
155 The tree data structure is a Linear data Non-linear data Graphical data Data structure like B
structure structure structure queue
156 When should you use a Whenever the Whenever the Whenever the Whenever the B
const reference parameter has parameter has parameter has parameter has
parameter? huge size huge size, the huge size, the huge size, and the
function changes function changes function does not
the parameter the parameter change the
within its body, within its body, parameter within
and you do NOT and you DO want its body
want these these changes to
changes to alter alter the actual
the actual argument
argument

Safi Khan | Virtual University of Pakistan


50 Computer Science MCQs for NTS / PPSC

157 class foo Only x can alter the Only y can alter the Only z can alter the Two of the D
{ private member private member private member functions can alter
public: variables of the variables of the variables of the the private
void x(foo f); object that object that object that member variables
void y(const foo f); activates the activates the activates the of the object that
void z(foo f) const; function function function activates the
Which of the three function
member functions can
alter the PRIVATE member
variables of the foo object
that activates the
function?
158 What is the maximum 1 2 n (where n is the There is no fixed D
depth of recursive calls a argument) maximum
function may make?
159 Suppose n is the number Log2 (n+1) -1 Log2 (n+1) Log2 (n) - 1 Log2 (n) A
of nodes in a complete
Binary Tree then maximum
steps required for a search
operation are
160 In the linked list At the head At the tail After all other After all other A
implementation of the entries that are entries that are
stack class, where does the greater than the smaller than the
push member function new entry new entry
places the new entry on
the linked list?
161 we have a circular array data[1] data[2] data[11] data[12] D
implementation of the
queue class, with ten items
in the queue stored at
data[2] through data[11].
The CAPACITY is 42, i.e.,
the array has been
declared to be of size 42.
Where does the push
member function place the
new entry
162 The expression AB+C* is Prefix expression Postfix expression Infix expression None of these B
called?
163 _________ is a binary tree Strictly Binary Tree Binary Search tree AVL tree All of these B
where every node has a
value, every node's left
subtree contains only
values less than or equal
to the node's value, and
every node's right subtree
contains only values that
are greater then or equal?
164 Consider the following J and I H and E D and E L and M D
binary search tree (BST), If
node A in the BST is
deleted, which two nodes
are the candidates to take

Safi Khan | Virtual University of Pakistan


51 Computer Science MCQs for NTS / PPSC

its place?
165 We access elements in AVL Linear way only Non Linear way Both linear and None of the given B
Tree in only non linear ways options
166 AVL Tree is Non Linear data Linear data Hybrid data None of the given A
structure Click structure structure (Mixture options
here for detail of Linear and Non
Linear)
167 Each operator in a postfix 1 2 3 4 B
expression refers to the
previous ________
operand(s)
168 Which one of the following None of the given Call by passing the Call by passing Call by passing the B
calling methods does not options value of the reference of the address of the
change the original value argument argument argument
of the argument in the
calling function?
169 A tree is an AVL tree if Any one node At least half of the All the nodes fulfill None of the given C
fulfills the AVL nodes fulfill the the AVL condition options
condition AVL condition
170 Consider the following 8 7 6 5 C
tree.
How many of the nodes
have at least one sibling?
171 The nodes with no Leaf Nodes Root Nodes Both of these None of these A
successor are called
_________
172 A binary search tree 1 2 3 4 B
should have minimum of
one ________ node/s at
each level
173 A subscript of an array True False A
may be an integer or an
integer expression
174 Doubly Linked List always True False B
has one NULL pointer
175 In which of the traversal In preorder In inorder traversal In postorder All of the given A
method, the recursive calls traversal only only traversal only options
can be used to traverse a
binary tree ?
176 Suppose currentNode (currentNode == (currentNode- (nextNode.data == (currentNode.data A
refers to a node in a linked null) >nextNode == null) null) == 0.0)
list (using the Node class
with member variables
called data and nextNode).
What boolean expression
will be true when cursor
refers to the tail node of
the list?
177 Which of the following if (alpha < beta) if if (LessThan(alpha, if B
tests in the client code (alpha.LessThan(be beta)) (LessThan(alpha).b
correctly compares two ta)) eta)
class objects alpha and
beta?
Safi Khan | Virtual University of Pakistan
52 Computer Science MCQs for NTS / PPSC

178 In C what is the operation Assign a value to Declare primitive Create a new None of these C
that you can not do with primitive type types to be instance of
primitive types? using a literal constant using the primitive type with
Const keyword New keyword
179 The operation for adding add append insert push D
an entry to a stack is
traditionally called
180 The operation for delete peek pop remove C
removing an entry from a
stack is traditionally called
181 Consider the following 7 8 9 10 11 12 9 8 11 10 7 12 9 10 8 11 12 7 9 10 8 12 7 11 A
sequence of push
operations in a stack:
stack.push(7);
stack.push(8);
stack.push(9);
stack.push(10);
stack.push(11);
stack.push(12);
182 ________ is the maximum Zero 2n (where n is the Any Number None of these C
number of nodes that you number of nodes
can have on a stack-linked in linked list)
list ?
183 Which of the following can Stack Queue Both of these None of these A
be used to reverse a string
value
184 An array is a group of True False A
consecutive related
memory locations
185 Which one of the following Array size can be Link List size can be Binary Search Tree AVL Tree size can A
statements is NOT correct? changed after its changed after its size can be be changed after
creation creation changed after its its creation
creation
186 Suppose that the class if (alpha < beta) if if (LessThan(alpha, if B
declaration of SomeClass (alpha.LessThan(be beta)) (LessThan(alpha).b
includes the following ta)) eta)
function prototype. bool
LessThan( SomeClass
anotherObject );
Which of the following
tests in the client code
correctly compares two
class objects alpha and
beta?
187 A queue is a----- data FIFO, LIFO LIFO,FIFO none of these both of these A
structure, whereas a stack
is a -----data structure
188 Which one of the following Multiplication Minus operator Plus operator Exponentiation A
operators has higher operator operator
priority than all of others?
189 Four statements about Trees are The order of a tree A search tree is a If Tree1's size is D
trees are below. Three of recursively defined indicates a special type of tree greater than
them are correct. Which multi-dimensional maximum number where all values Tree2's size, then

Safi Khan | Virtual University of Pakistan


53 Computer Science MCQs for NTS / PPSC

one is INCORRECT? data structures of children allowed (i.e. keys) are the height of
tree at each node of the ordered Tree1 must also
be greater than
Tree2's height
190 Which of the following is We can increase We can decrease We can increase We can neither D
"TRUE" about arrays the size of arrays the size of arrays but can't decrease increase nor
after their creation after their creation the size of arrays decrease the array
after their creation size after their
creation
191 Consider the following 56/ + 2 562/+ 56/2+ /62 + 5 B
infix expression. 5 + 6/2 If
one converts the above
expression into postfix,
what would be the
resultant expression?
192 Addition of new items in Increment, bits Increment, bytes Decrement, bits Decrement, bytes D
stack make the pointer ----
-------- by 2
193 Next item in a linked list is Index Item Node Child C
known as
194 In an AVL tree to delete a Single Double Triple None B
parent with two childs in a
straight line following
rotations will be required
195 BST is a Structure Linear Non Linear Circular None of Above B
196 After creation of an array Size can be Size can be Size can neither be Size can be C
increase but can decreased but can increased nor be increased and can
not be decreased not be increased decreased also be decreased
197 Each node in a BST has 1 2 3 4 B
Pointers
198 Highest Operators Plus Minus Multiply Exponentiation C
Precedence is of the
following operator
199 Following are the linear Stacks Queues Both a & b None of the above C
data structures
200 Each entry which points to Node First Node Last Node Head Node C
a null value in a Singly
Linked List is known as
201 Non recursive calls are True False A
faster than the Recursive
calls
202 Tree data structure is a Linear Non Linear Circular None of Above B
203 When an operator is used Prefix Postfix Infix None of the Above C
in between two operands
this is which type of
notation
204 Suppose a pointer has That pointer points That pointer None of these That pointer D
been declared in main but to First byte in contains a NULL points to any
has not assigned any main function value memory address
variable address then
205 Which statement of the Lists can be A list is a sequence Stack is a special Stacks are easier D
following statements is implemented by of one or more kind of list in which to implement than
incorrect? using arrays or data items all insertions and lists
Safi Khan | Virtual University of Pakistan
54 Computer Science MCQs for NTS / PPSC

linked lists deletions take


place at one end
206 Parameters in function call Stack Queue Binary Search Tree AVL Tree A
are passed using
207 void test_a(int n) { cout << 420 024 02 24 A
n << " "; if (n>0) test_a(n-
2); } What is printed by the
call test_a(4)?
208 Queue follows Last in First out First in Last out First in First out None of these C
209 is a binary tree where Strictly Binary Tree Binary Search tree AVL tree All of these B
every node has a value,
every node's left subtree
contains only values less
than or equal to the node's
value, and every node's
right subtree contains only
values that are greater
then or equal ?
210 Below is a binary search 50 60 70 80 D
tree. If we delete the value
50 using the algorithm we
discussed, what value will
be in the root of the
remaining tree?
211 Is a data structure that can Array List Both of these None of these B
grow easily dynamically at
run time without having to
copy existing elements?
212 In a program a reference int &x ; int *x ; int x ; None of the given A
variable, say x, can be options
declared as
213 Linked lists are collections True False B
of data items "lined up in a
row" , insertions and
deletions can be made
only
at the front and the back
of a linked list
214 A Linear Data Structure is Arrays LinkLists Binary Search None of these C
the data structure in which Trees
data elements are
arranged in a sequence or
a linear list. Which of the
following is Non Linear
Data Structure?
215 Which one of the following Array size is fixed Link List size is Binary Search Tree AVL Tree size is A
statements is correct? once it is created fixed once it is size isfixed once it fixed once it is
created is created created
216 Which one of the following They always point They may point to The address of two None of these B
is correct about pointers? todifferent a singlememory pointer variables is
memory locations location same
217 Which of the following short Int float long C
abstract data types are
Safi Khan | Virtual University of Pakistan
55 Computer Science MCQs for NTS / PPSC

NOT used by Integer


Abstract Data type group?
218 We can add elements in Front Rear From Both Rare None of these B
QUEUE From _________ and Front
219 3 + 5 * 6 - 7 * (8 + 5) 365+*758+-* 365758+*+-* 356+*785+-* 356*+785+*- D
Which of the following is a
correct equivalent
expression(s) for the
above?
220 An array is a group of True False A
consecutive related
memory locations
221 A node cannot be deleted, True False B
when the node to be
deleted has both left and
right subtrees
222 Deleting a leaf node in 1 2 3 4 A
binary search tree involves
setting ______ pointer/s of
that nodes parent as null
223 For a perfect binary tree of 31 30 27 26 A
height 4. What will be the
sum of heights of nodes?
225 If we want to find median 5 25 35 50 B
of 50 elements, then after
applying buildHeap
method, how many times
deleteMin method will be
called ?
226 The main reason of using improve code is readable less code heap can't be used A
heap in priority queue is performance in priority queues
227 The total number of nodes 256 512 1024 Can't be D
on 10th level of a perfect determined
binary tree are
228 Which property of Reflexivity Symmetry Transitivity All of the above B
equivalence relation is
satisfied if we say: Ahmad
R(is related to) Ahmad
229 If a tree has 50 nodes, 55 51 50 49 N-1= 49 D
then the total edges/links
in the tree will be
230 Consider a max heap, 40,30,20,10,15,16, 40,30,20,10,35,16, 40,35,20,10,30,16, 40,35,20,10,15,16, A
represented by the 17,8,4,35 17,8,4,15 17,8,4,15 17,18,4,30
following array;
40,30,20,10,15,16,17,18,4
After inserting a nodes
with value 35.Which of
following is the updated
max heap?
231 It is necessary fro Huffman AVL tree Binary tree Complete binary None of these B
encoding tree to be Tree
232 A binary tree with 45 44 45 46 90 C
internal nodes has
Safi Khan | Virtual University of Pakistan
56 Computer Science MCQs for NTS / PPSC

_________ links to
external nodes
233 In which of the following Max heap Binary search tree Threaded Binary Complete Binary D
tree, parent nodes has key tree tree
greater than or equal to its
both children?
234 If there are N external N-1 N N+1 N+2 C
nodes is a binary tree then
what will be the no. of the
internal nodes in this
binary tree?
235 See the below code and fill Dummy rootNode LTH RTH A
the appropriate answer
for? Void
fastlnorder(TreeNod+p)
{while((p+nextInorder(p))
!+ ? ) cout << p->getInfo();}
236 An expression tree will Complete binary Binary search tree Heap AVL tree Non of then B
always be a tree
237 In a threaded binary tree All leaf nodes Nodes other then Root Node None of the nodes A
which nodes have NULL leaf nodes
child pointers
238 We implement the heap Threaded Tree AVL tree Complete binary Expression C
by ____ tree
239 Which of the following Traversing a heap Removing the item Inserting an item is A heap may be A
statement concerning in order provides at the top provides always done at the stored in an array
heaps is NOT true? access to the data immediate access end of the array,
in numeric or to the key value but requires
alphabetical order with highest (or maintaining the
lowest) priority heap property
240 When a complete binary 2 3 4 6 C
tree represented by an
array then if right child is
at position 5 then left child
will be at position _____
241 If a binary tree has N + 1 It has N internal It has N-1 internal It has N/2 internal It has N+2 internal A
external nodes then nodes nodes nodes nodes
242 Consider a binary tree, True False B
represented by the
following array:
A,B,C,D,E,F,G,I Is it a
strictly binary tree ?

Safi Khan | Virtual University of Pakistan


57 Computer Science MCQs for NTS / PPSC

CS302-Digital Logic Design


ID Qus A B C D Ans
1 A 8-bit serial in / parallel out 1 2 4 8 D
shift register contains the
value 8, _____ clock signal(s)
will be required to shift the
value completely out of the
register
2 In a sequential circuit the next State variable, Current state, Current state Input and clock C
state is determined by current state flip-flop output and external signal applied
________ and _______ input
3 The divide-by-60 counter in Mod-6, Mod-10 Mod-50, Mod-10 Mod-10, Mod- Mod-50, Mod-6 A
digital clock is implemented by 50
using two cascading counters
4 In NOR gate based S-R latch if True False A
both S and R inputs are set to
logic 0, the previous output
state is maintained
5 The minimum time for which Set-up time Hold time Pulse Interval Pulse Stability time B
the input signal has to be time (PST)
maintained at the input of flip-
flop is called ______ of the
flip-flop
6 74HC163 has two enable input ENP, ENT ENI, ENC ENP, ENC ENT, ENI A
pins which are _______ and
_________
7 ____________ is said to occur Clock Skew Race condition Hold delay Hold and Wait B
when multiple internal
variables change due to
change in one input variable
8 The _____________ input Asynchronous, Synchronous, Preset input Clear input (CLR), A
overrides the ________ input synchronous asynchronous (PRE), Clear Preset input (PRE)
input (CLR)
9 A decade counter is Mod-3 counter Mod-5 counter Mod-8 counter Mod-10 counter D
__________
10 In asynchronous transmission It is set to logic low It is set to logic Remains in State of B
when the transmission line is high previous state transmission line is
idle, _________ not used to start
transmission
11 Excess-8 code assigns _______ 1110 1100 1000 0000 D
to -8
12 The voltage gain of the Vout / Vin = - Rf / Vout / Rf = - Vin / Rf / Vin = - Ri / Rf / Vin = Ri / Vout A
Inverting Amplifier is given by Ri Ri Vout
the relation ________
13 LUT is acronym for _________ Look Up Table Local User Least Upper None of given A
Terminal Time Period options
14 Addition of two octal numbers 213 123 127 345 C
36 and 71 results in
________
15 ___________ is one of the J-K input EN input Preset input Clear Input (CLR) A
examples of synchronous (PRE)
inputs

Safi Khan | Virtual University of Pakistan


58 Computer Science MCQs for NTS / PPSC

16 __________occurs when the Race condition Clock Skew Ripple Effect None of given B
same clock signal arrives at options
different times at different
clock inputs due to
propagation delay
17 In a state diagram, the Current state and Current state and Previous state Previous state and A
transition from a current state the inputs outputs and inputs outputs
to the next state is determined
by
18 ________ is used to simplify State diagram Next state table State reduction State assignment D
the circuit that determines the
next state
19 The three fundamental gates AND, NAND, XOR OR, AND, NAND NOT, NOR, XOR NOT, OR, AND D
are ___________
20 The total amount of memory The organization The structure of The size of The size of the D
that is supported by any digital of memory memory decoding unit address bus of the
system depends upon ______ microprocessor
21 Stack is an acronym for FIFO memory LIFO memory Flash Memory Bust Flash Memory B
_________
23 Assume that a 4-bit serial 1100 0011 0000 1111 C
in/serial out shift register is
initially clear. We wish to store
the nibble 1100. What will be
the 4-bit pattern after the
second clock pulse? (Right-
most bit first.)
24 The operation of J-K flip-flop is Doesnt have an Sets to clear It does not It does not accept A
similar to that of the SR flip- invalid state when both J = 0 show transition asynchronous
flop except that the J-K flip- and K = 0 on change in inputs
flop ___________ pulse
25 A multiplexer with a register Serial data to Parallel data to Serial data to Parallel data to B
circuit converts _________ parallel serial serial parallel
26 A GAL is essentially a ________ Non- PAL that is Very large PAL Reprogrammable D
reprogrammable programmed only PAL
PAL by the
manufacturer
27 in ____________, all the Sequential Access MOS Access FAST Mode None of given C
columns in the same row are Page Access options
either read or written
28 In order to synchronize two Read Only Fist In First Out Flash Memory Fast Page Access B
devices that consume and Memory Memory Mode Memory
produce data at different
rates, we can use _________
29 A positive edge-triggered flip- Low-to-high High-to-low Enable input Preset input (PRE) A
flop changes its state when transition of clock transition of clock (EN) is set is set
________________
30 A frequency counter Counts pulse Counts no. of Counts high and None of given B
______________ width clock pulses in 1 low range of options
second given clock
pulse
31 Flip flops are also called Bi-stable Bi-stable Bi-stable Bi-stable C
_____________ dualvibrators transformer multivibrators singlevibrators
32 Given the state diagram of an The next state of a The previous Both the next The state diagram A
Safi Khan | Virtual University of Pakistan
59 Computer Science MCQs for NTS / PPSC

up/down counter, we can find given present state of a given and previous shows only the
________ state present state states of a given inputs/outputs of a
state given states
33 A Nibble consists of _____ bits 2 4 8 16 B
34 DRAM stands for __________ Dynamic RAM Data RAM Demoduler None of given A
RAM options
35 The expression F=A+B+C OR AND NOT NAND A
describes the operation of
three bits _____ Gate
36 The ANSI/IEEE Standard 754 8-bit 16-bit 32-bit 64-bit C
defines a __________Single-
Precision Floating Point format
for binary numbers
37 The decimal 17 in BCD will 11101 11011 10111 11110 C
be represented as _________
38 The basic building block for a A Flip-Flop A Logical Gate An Adder None of given B
logical circuit is _______ options
39 The output of the expression Undefined One Zero No Output as input C
F=A.B.C will be Logic ________ is invalid
when A=1, B=0, C=1
40 ________ is invalid number of 2 8 12 16 C
cells in a single group formed
by the adjacent cells in K-map
41 The PROM consists of a fixed AND OR NOT XOR A
non-programmable
____________ Gate array
configured as a decoder
42 ___________ is one of the J-K input S-R input D input Clear Input (CLR) D
examples of asynchronous
inputs
43 ________ is used to minimize State assignment State reduction Next state table State diagram A
the possible no. of states of a
circuit
44 The best state assignment Maximizes the Minimizes the Minimize the None of given A
tends to ___________ number of state number of state equivalent options
variables that variables that states
dont change in a dont change in a
group of related group of related
states states
45 The address from which the Depends on None of given RAM Microprocessor D
data is read, is provided by circuitry options
_______
46 FIFO is an acronym for First In, First Out Fly in, Fly Out Fast in, Fast Out None of given A
__________ options
47 The sequence of states that n+2 (n plus 2) 2n (n multiplied 2n (2 raise to n2 (n raise to B
are implemented by a n-bit by 2) power n) power 2)
Johnson counter is
48 "A + B = B + A" is __________ Demorgans Law Distributive Law Commutative Associative Law C
Law
49 An alternate method of Using a single Using Iterative Connecting Extra logic gates B
implementing Comparators comparator Circuit based comparators in are always required
which allows the Comparators Comparators vertical
to be easily cascaded without hierarchy
Safi Khan | Virtual University of Pakistan
60 Computer Science MCQs for NTS / PPSC

the need for extra logic gates


is _______
50 Demultiplexer is also called Data selector Data router Data distributor Data encoder C
51 A flip-flop is connected to +5 10 Mw 25 mW 64 mW 1024 B
volts and it draws 5 mA of
current during its operation,
the power dissipation of the
flip-flop is
52 ____________ counters as the Asynchronous Synchronous Positive-Edge Negative-Edge A
name indicates are not triggered triggered
triggered simultaneously
53 A synchronous decade counter 3 4 7 10 B
will have _______ flip-flops
54 The alternate solution for a Parallel in / Serial Serial in / Parallel Parallel in / Serial in / Serial B
demultiplexer-register out shift register out shift register Parallel out shift Out shift register
combination circuit is register
_________
55 A GAL is essentially a Non- PAL that is Very large PAL Reprogrammable D
________. reprogrammable programmed only PAL
PAL by the
manufacturer
57 The 4-bit 2s complement 1010 1110 1011 0101 D
representation of +5 is
_____________
58 The storage cell in SRAM is a flip flop a capacitor a fuse a magnetic domain B
59 What is the difference The D latch has a The D flip-flop has The D latch is The D flip-flop has D
between a D latch and a D flip- clock input an enable input used for faster a clock input
flop? operation
60 For a positive edge-triggered J- toggle set reset not change A
K flip-flop with both J and K
HIGH, the outputs will______
if the clock goes HIGH
61 The OR gate performs Boolean multiplication subtraction division addition D
___________
62 If an S-R latch has a 1 on the S set reset invalid clear A
input and a 0 on the R input
and then the S input goes to 0,
the latch will be
63 Determine the values of A, B, A = 1, B = 0, C = 0, A = 1, B = 0, C = 1, A = 0, B = 1, C = A = 1, B = 0, C = 1, B
C, and D that make the sum D=0 D=0 0, D = 0 D=1
term A(bar) + B+C(bar)+D
equal to zero
64 The power dissipation, PD, of a dc supply voltage dc supply voltage ac supply ac supply voltage A
logic gate is the product of the and the peak and the average voltage and the and the average
current supply current peak current supply current
65 A Karnaugh map is similar to a True False A
truth table because it presents
all the possible values of input
variables and the resulting
output of each value
66 NOR Gate can be used to True False A
perform the operation of AND,
OR and NOT Gate
Safi Khan | Virtual University of Pakistan
61 Computer Science MCQs for NTS / PPSC

67 Using multiplexer as parallel to A parallel to serial A counter circuit A BCD to A 2-to-8 bit A
serial converter requires converter circuit Decimal decoder
___________ connected to the decoder
multiplexer
68 The 3-variable Karnaugh Map 4 8 12 16 B
(K-Map) has _______ cells for
min or max terms
69 In designing any counter the Current state and Only inputs Only current current state and A
transition from a current state inputs state outputs
to the next sate is determined
by
70 Sum term (Max term) is OR AND NOT OR-AND A
implemented using ________
gates
72 AT T0 THE VALUE STORED IN A 2 4 6 8 D
4-BIT LEFT SHIFT WAS 1.
WHAT WILL BE THE VALUE OF
REGISTER AFTER THREE CLOCK
PULSES?
73 WHEN BOTH THE INPUTS OF THE FLOP-FLOP IS Q=0 AND Q=1 Q=1 AND Q=0 THE OUTPUT OF C
EDGE-TRIGGERED J-K FLOP- TRIGGERED FLIP-FLOP
FLOP ARE SET TO LOGIC ZERO REMAINS
_________ UNCHANGED
74 If S=1 and R=0, then Q(t+1) = 0 1 Invalid Input is invalid B
_________ for positive edge
triggered flip-flop
75 If S=1 and R=1, then Q(t+1) = 0 1 Invalid Input is invalid C
_________ for negative edge
triggered flip-flop
76 We have a digital circuit. Using S-R Flop- D-flipflop J-K flip-flop T-Flip-Flop C
Different parts of circuit Flop
operate at different clock
frequencies (4MHZ, 2MHZ and
1MHZ), but we have a single
clock source having a fix clock
frequency (4MHZ), we can get
help by ___________
77 A counter is implemented 3 7 8 15 C
using three (3) flip-flops,
possibly it will have ________
maximum output status
78 In ________ Q output of the Moore machine Meally machine Johnson Ring counter D
last flip-flop of the shift counter
register is connected to the
data input of the first flip-flop
of the shift register
79 The _________ of a ROM is Write Time Recycle Time Refresh Time Access Time D
the time it takes for the data
to appear at the Data Output
of the ROM chip after an
address is applied at the
address input lines
80 Bi-stable devices remain in Ten Eight Three Two D
Safi Khan | Virtual University of Pakistan
62 Computer Science MCQs for NTS / PPSC

either of their _________


states unless the inputs force
the device to switch its state
81 A full-adder has a Cin = 0. = 0, Cout = 0 = 0, Cout = 1 = 1, Cout = 0 = 1, Cout = 1 B
What are the sum ( ) and the
carry (Cout) when A = 1 and B
= 1?
82 THE GLITCHES DUE TO RACE GATED FLIP-FLOPS PULSE POSITIVE-EDGE NEGATIVE-EDGE D
CONDITION CAN BE AVOIDED TRIGGERED FLIP- TRIGGERED TRIGGERED FLIP-
BY USING A ___________ FLOPS FLIP-FLOPS FLOPS
83 The design and Truth table k-map state table state diagram D
implementation of
synchronous counters start
from _________
84 THE HOURS COUNTER IS ONLY A SINGLE MOD-10 AND MOD-10 AND A SINGLE DECADE D
IMPLEMENTED USING MOD-12 COUNTER MOD-6 MOD-2 COUNTER AND A
__________ IS REQUIRED COUNTERS COUNTERS FLIP-FLOP
86 ______ of a D/A converter is Resolution Accuracy Quantization Missing Code B
determined by comparing the
actual output of a D/A
converter with the expected
output
88 The high density FLASH 1 floating-gate 2 floating-gate 4 floating-gate 6 floating-gate A
memory cell is implemented MOS transistor MOS transistors MOS transistors MOS transistors
using ______________
89 Q2 :=Q1 OR X OR Q3 The Q2:= Q1 $ X $ Q3 Q2:= Q1 # X # Q3 Q2:= Q1 & X & Q2:= Q1 ! X ! Q3 B
above ABEL expression will be Q3
90 Generally, the Power TTL CMOS 3.5 series CMOS 5 Series Power dissipation A
dissipation of _______ devices of all circuits
remains constant throughout increases with time
their operation
91 When the control line in tri- AND OR NOT XOR C
state buffer is high the buffer
operates like a ________gate
92 3.3 v CMOS series is Low switching Fast switching Fast switching Low switching C
characterized by __________ speeds, high speeds, high speeds, very speeds, very low
and _________as compared to power dissipation power dissipation low power power dissipation
the 5 v CMOS series dissipation
93 The output of an AND gate is All of the inputs Any of the input is Any of the input All the inputs are A
one when _______ are one one is zero zero
94 The binary numbers A = 1100 A > B = 1, A < B = A > B = 0, A < B = A > B = 1, A < B A > B = 0, A < B = 1, C
and B = 1001 are applied to 0, A < B = 1 1, A = B = 0 = 0, A = B = 0 A=B=1
the inputs of a comparator.
What are the output levels?
95 Demultiplexer converts Parallel data, serial Serial data, Encoded data, All of the given B
_______ data to __________ data parallel data decoded data options
data
96 In asynchronous digital True False B
systems all the circuits change
their state with respect to a
common clock
97 A negative edge-triggered flip- Enable input (EN) Preset input (PRE) Low-to-high High-to-low D
flop changes its state when is set is set transition of transition of clock
Safi Khan | Virtual University of Pakistan
63 Computer Science MCQs for NTS / PPSC

________________ clock
98 A divide-by-50 counter divides 10 Hz 50 Hz 100 Hz 500 Hz B
the input ______ signal to a 1
Hz signal
99 In _______ the Q output of the Moore machine Meally machine Johnson Ring counter C
last flip-flop of the shift counter
register is connected to the
data input of the first flip-flop
100 Which is not characteristic of a Serial in/parallel in Serial in/parallel Parallel in/serial Parallel in/parallel A
shift register? out out out
101 The output of an XNOR gate is I Only IV Only I and IV only II and III only D
1 when ____________ I) All
the inputs are zero II) Any of
the inputs is zero III) Any of the
inputs is one IV) All the inputs
are one
102 NAND gate is formed by AND Gate and NOT Gate and AND Gate and OR Gate and then A
connecting _________ then NOT Gate then AND Gate then OR Gate AND Gate
103 Consider A=1,B=0,C=1. A, B Zero One Undefined No output as input B
and C represent the input of is invalid
three bit NAND gate the
output of the NAND gate will
be _____
104 The capability that allows the Radiation-Erase In-System In-chip Electronically-Erase B
PLDs to be programmed after programming Programming Programming programming
they have been installed on a method (REPM) (ISP) (ICP) method(EEPM)
circuit board is called
__________
105 The ABEL symbol for OR ! & # $ C
operation is
106 For a gated D-Latch if EN=1 0 1 Q(t) Invalid B
and D=1 then Q(t+1) =
_________
107 In ________ outputs depend Mealy machine Moore Machine State Reduction State Assignment A
only on the combination of table table
current state and inputs
108 In the following statement( Z An inverted An inverted Active-high Active-low D
PIN 20 ISTYPE reg.invert;) register input register input at Registered Registered Mode
The keyword reg.invert pin 20 Mode output output
indicates ________
109 If the FIFO Memory output is It is locked; no It is not locked; Previous data is None of given D
already filled with data then data is allowed to the new data swapped out of options
________ enter overwrites the memory and
previous data new data enters
110 The process of converting the Strobing Amplification Quantization Digitization C
analogue signal into a digital
representation (code) is known
as ___________
111 Q2 :=Q1 OR X OR Q3 The Q2:= Q1 $ X $ Q3 Q2:= Q1 # X # Q3 Q2:= Q1 & X & Q2:= Q1 ! X ! Q3 B
above ABEL expression will be Q3
112 Caveman number system is 2 5 10 16 B
Base ______ number system
113 The output of an XOR gate is I Only IV Only I and IV only II and III only C
Safi Khan | Virtual University of Pakistan
64 Computer Science MCQs for NTS / PPSC

zero (0) when __________ I)


All the inputs are zero II) Any
of the inputs is zero III) Any of
the inputs is one IV) All the
inputs are one
114 The simplest and most n to 2n (n-1) to 2n (n-1) to (2n-1) n to 2n-1 A
commonly used Decoders are
the ______ Decoders
115 The _______ Encoder is used 2-to-8 encoder 4-to-16 encoder BCD-to-Decimal Decimal-to-BCD D
as a keypad encoder Priority
116 3-to-8 decoder can be used to True False A
implement Standard SOP and
POS Boolean expressions
117 If the S and R inputs of the AND OR NOT XOR C
gated S-R latch are connected
together using a ______gate
then there is only a single
input to the latch. The input is
represented by D instead of S
or R (A gated D-Latch)
118 The low to high or high to low State Edge Trigger One-shot B
transition of the clock is
considered to be a(n)
________
119 RCO Stands for _________ Reconfiguration Reconfiguration Ripple Counter Ripple Clock D
Counter Output Clock Output Output Output
120 A transparent mode means The changes in the The changes in Propagation Input Hold time is A
_____________ data at the inputs the data at the Delay is zero zero (no need to
of the latch are inputs of the latch (Output is maintain input
seen at the output are not seen at immediately after clock
the output changed when transition)
clock signal is
applied)
121 In ________ outputs depend Mealy machine Moore Machine State Reduction State Assignment B
only on the current state table table
122 The alternate solution for a Parallel in / Serial Serial in / Parallel Parallel in / Serial in / Serial A
multiplexer and a register out shift register out shift register Parallel out shift Out shift register
circuit is _________ register
123 Smallest unit of binary data is Bit Nibble Byte Word A
a ________
124 Excess-8 code assigns _______ 0000 1001 1000 1111 A
to +7
125 NOR gate is formed by OR Gate and then NOT Gate and AND Gate and OR Gate and then A
connecting _________ NOT Gate then OR Gate then OR Gate AND Gate
126 A particular half adder has 2 INPUTS AND 1 2 INPUTS AND 2 3 INPUTS AND 1 3 INPUTS AND 2 B
OUTPUT OUTPUT OUTPUT OUTPUT
127 THE FOUR OUTPUTS OF TWO AND OR NAND XOR B
4-INPUT MULTIPLEXERS,
CONNECTED TO FORM A 16-
INPUT MULTIPLEXER, ARE
CONNECTED TOGETHER
THROUGH A 4-INPUT
__________ GATE
Safi Khan | Virtual University of Pakistan
65 Computer Science MCQs for NTS / PPSC

128 A FIELD-PROGRAMMABLE TRUE FALSE A


LOGIC ARRAY CAN BE
PROGRAMMED BY THE USER
AND NOT BY THE
MANUFACTURER
129 5-BIT JOHNSON COUNTER 7 10 32 25 B
SEQUENCES THROUGH ____
STATES
130 A logic circuit with an output two AND gates, three AND gates, two AND gates, two AND gates, C
consists of ________ two OR gates, two two OR gates, one OR gate, one OR gate
inverters one inverter two inverters
131 The power consumed by a flip- P = Icc x Rcc P = Vcc x Rcc P = Vcc x Icc P = Mcc x Vcc C
flop is defined by __________
132 If S=1 and R=0, then for 0 1 Invalid Input is invalid A
positive edge triggered flip-
flop Q(t+1) = _______ Select
correct option
133 Bi-stable devices remain in 10 8 3 2 D
either of their _______ states
unless the inputs force the
device to switch its state
134 When the both inputs of edge- The flop-flop is Q=0 and Q=1 Q=1 and Q=0 The output of flip- B
triggered J-K flop-flop are set triggered flop remains
to logic zero _______ unchanged
135 The counter states or the (n raise to power (n raise to power (2 raise to (2 raise to power n A
range of numbers of a counter 2) 2 and then minus power n) and then minus 1)
is determined by the formula. 1)
n represents the total
number of flip-flops)
136 The Synchronous counters are True False B
also known as Ripple Counters
137 The terminal count of a 4-bit 1100 0011 1111 0000 D
binary counter in the UP mode
is__________
138 The counter states or the (n raise to power (n raise to power 2 raise to power (2 raise to power n C
range of numbers of a counter 2) 2 and then minus n) and then minus 1)
is determined by the formula. 1)
(n represents the total
number of flip-flops)
139 The 74HC163 is a 4-bit 2 4 6 8 B
Synchronous Counter.it
has..............parallel data
inputs pins
140 In designing any synchronous Registers Flip Flops Counters Latches B
counter a modulus number is
used which determine the
number of............ used in a
counter
141 A synchronous decade counter 3 4 7 10 A
will have _____ flip-flops
142 occurs when the same clock Race condition Clock Skew Ripple Effect None of given B
signal arrives at different times options
at different clock inputs due to
Safi Khan | Virtual University of Pakistan
66 Computer Science MCQs for NTS / PPSC

propagation delay
143 A one-shot mono-stable device AND gate, NAND gate, NOR gate, XNOR gate, B
contains _______ Resistor, Capacitor Resistor, Resistor, Resistor, Capacitor
and NOT Gate Capacitor and Capacitor and and NOT Gate
NOT Gate NOT Gate
144 An Astable multivibrator is Oscillator Booster One-shot Dual-shot C
known as a(n) _____
145 A decade counter is ________ Mod-3 counter Mod-5 counter Mod-8 counter Mod-10 counter D
146 A mono-stable device only has True False A
a single stable state
147 For a down counter that 111 110 010 none of given D
counts from (111 to 000), if options
current state is "101" the next
state will be _______
148 The terminal count of a 4-bit 0000 0011 1100 1111 D
binary counter in the DOWN
mode is__________
149 In case of cascading Integrated True False B
Circuit counters, the enable
inputs and RCOof the
Integrated Circuit counters
allow cascading of multiple
counters together
150 A decade counter can be True False A
implemented by truncating the
counting sequence of a MOD-
20 counter
151 For a gated D-Latch if EN=1 0 1 Q(t) Invalid D
and D=1 then Q(t+1) =
_______
152 A flip-flop is presently in SET J = 1, K = 0 J = 1, K = X(Don't J = X(Don't J = 0, K = X(Don't B
stae and must remain SET on care) care), K = 0 care)
the next cliock pulse. What
must j and K be?
153 Divide-by-160 counter is Flip-Flop and DIV Flip-Flop and DIV DIV 16 and DIV DIV 16 and DIV 10 C
acheived by using 10 16 32
154 Three cascaded modulus-10 30 100 1000 0000 C
counters have an overall
modulus of
155 A standard SOP form has And OR Sum Not C
__________ terms that have
all the variables in the domain
of the expression
156 Which one of the following is A+1=1 A= A.A = A A+0=A B
not a valid rule of Boolean
algebra?
157 How many data select lines are 1 2 3 4 C
required for selecting eight
inputs?
158 If two adjacent 1s are detected 0011 0101 1100 1010 A
in the input, the output is set
to high. input combinations
will be
Safi Khan | Virtual University of Pakistan
67 Computer Science MCQs for NTS / PPSC

159 The 4-variable Karnaugh Map 2,2 4,4 4,2 2,4 B


(K-Map) has ______rows and
____colums
161 The boolean expression AB'CD' a sum term a product term a literal term always 1 B
is
162 Dont care conditions are 0 1 X None of the given C
marked as ___________ in the options
output column of the function
table
163 An example of SOP expression A + B(C + D) A'B + AC' + AB'C (A' + B + C)(A + both (a) nad (b D
is B' + C)
164 For a Standard SOP expression, 0 1 X None of the given B
a ______ is placed in the cell options
corresponding to the product
term (Minterm) present in the
expression
165 The complement of a variable 0 1 equal to the the inverse of the D
is always variable variable
166 The 4-variable K-Map has 2, 2 2, 4 4, 2 4, 4 D
______ rows and _________
columns of cells
167 Half-Adder Logic circuit 0 2 4 6 B
contains ___ XOR Gates
168 The boolean expression X = AB two ORs ANDed a 4-input AND two ANDs ORed an exclusive-Or C
+ CD represents together gate together
169 The domain of the expression A and D B only A,B,C and D none of these C
AB'CD + AB' + C'D + B is
170 A SOP expression having a 2 4 8 16 C
domain of 3 variables will have
a truth table having __
combinations of inputs and
corresponding output values
171 The boolean expression (A AB' AB + A'C A'B + B AB + BC B
+C)(AB' +AC)(A'C' + B')can be
simplified to
172 The bolean expression A + BC (A' + B)(A' + C) (A + B)(A + C) (A + B)(A' + C) none of the above B
equals
173 If a circuit suffers Clock Skew True False B
problem, the output of
circuit cant be guarantied
174 A 4-bit binary UP/DOWN 0001 1111 1000 1110 B
counter is in the binary state
zero. the next state in the
DOWN mode is__________
175 Karnaugh map is used in a clock a counter an UP/DOWN All of the above D
designing counter
176 Asynchronous mean Each flip-flop after Each flip-flop is Each flip-flop Each alternative D
that_____________ the first one is enabled by the except the last flip-flop after the
enabled by the output of the one is enabled first one is enabled
output of the preceding flip- by the output of by the output of
preceding flip-flop flop the preceding the preceding flip-
flip-flop flop
177 A modulus-14 counter has 14 Flip Flops 14 Registers 4 Flip Flops 4 Registers C
Safi Khan | Virtual University of Pakistan
68 Computer Science MCQs for NTS / PPSC

fourteen states
requiring_____________
178 If two adjacent 1s are detected 0011 0101 1100 1010 A
in the input, the output is set
to high
179 The boolean expression A + B' a sum term a literal term a product term a complemented A
+ C is term

Safi Khan | Virtual University of Pakistan


69 Computer Science MCQs for NTS / PPSC

CS304-Object Oriented Programming


ID Qus A B C D Ans
1 Inheritance is a way to organize data pass arguments add features to existing improve data- C
to objects of classes without hiding and
classes rewriting them encapsulation
2 To convert from a user- a built-in a one-argument an overloaded = a conversion C
defined class to a basic conversion constructor operator operator thats a
type, you would most operator member of the
likely use class
3 A C++ class is similar to --- Structure Header File Library File None of the A
----------------- given
4 aA static member Declared Define Instantiated Called C
function can be called,
even when a class is not
__________
5 Which one of the Encapsulation Polymorphism Data hiding Inheritance D
following features of OOP
is used to derive a class
from another?
6 What is a class? A class is a section A class is a A class is the part of an A class is a D
of computer section of the object that contains the description of a
memory containing hard disk variables kind of object
objects reserved for
object oriented
programs
7 The main function of To define an object To define a data To link the definition of All of the given B
scope resolution operator member an identifier to its
(::) is, declaration
8 Which of the following / - + ++ D
operators always takes no
argument if overloaded?
9 Assume a class C with take two return a value create a named take four A
objects obj1, obj2, and arguments temporary object arguments
obj3. For the statement
obj3 = obj1 - obj2
to work correctly, if the
overloaded - operator
must
10 The keyword that is used static const friend private B
that the variable can not
change state?
11 Suppose obj1 and obj2 A operator + ( A int + operator(); int operator (plus) (); A operator(A C
are two objects of a user &obj); &obj3);
defined class A. An +
operator is overloaded to
add obj1 and obj2 using
the function call
obj1+obj2. Identify the
correct function
prototype against the
given call?
12 We can get only one static variables dynamic instance variables data members A

Safi Khan | Virtual University of Pakistan


70 Computer Science MCQs for NTS / PPSC

unique value which can variables


be used by all the objects
of that class by the use of,
13 A member function Constructor Getter Setter Destructor D
having the same name as
that of a class and a ~ sign
with it is called,
14 Using encapsulation we Information hiding Least Implementation All of given D
can achieve interdependenci independenc options
es among
modules
15 The >= operator can be True False NA NA A
overloaded
16 A static member function Static Implicit Explicit Virtual B
cannot be declared
17 Static variables act like a True False NA NA A
global variable in the
context or scope of the
class
18 The compiler wont True False NA NA A
object if you overload the
* operator to perform
division
19 We can use "this" pointer True False NA NA B
in the constructor in the
body and even in the
initialization list
of any class if we are
careful
20 Which operator can not The relation Assignment Script operator ( [] ) Conditional D
be overloaded? operator ( >= ) operator ( = ) operator (? : )
21 An overloaded operator True False NA NA B
always requires one less
argument than its
number of operands
22 A generalization- data hiding friend classes encapsulation inheritance D
specialization relation
between classes are
implemented using
23 In OOP a class is an Data Type Abstract Type User Defined Type None of the C
example of _____ given
24 Identify which of the Rational_number Rational_numbe Rational_number operator+(doubl B
following overloaded operator+( r operator+(Rational_nu e& obj);
operator functions Rational_number operator+(doubl mber &obj, double&
declaration is appropriate & obj); e& obj); num);
for the given call?
Rational_number_1 +
2.325 Where
Rational_number_1 is an
object of user defined
class Rational_number
25 A class can be identified Noun Pronoun Verb Adverb A
from a statement by ------
Safi Khan | Virtual University of Pakistan
71 Computer Science MCQs for NTS / PPSC

-------
26 The members of a class Private member Data Member Public Member Static D
that can be accessed
without creating the
object of the class is
called
27 Suppose there is an Name Age Work() Both Name and D
object of type Person, Age
which of the following
can be considered as one
of its attributes
28 What a derived class can New data New member New constructors and All of given D
add? members functions and destructor
New friend
functions
29 ________ is/are used to Interface Private data Private member Both public and A
access information members functions private
hidden within an object? members
30 this pointers are not True False NA NA A
accessible for static
member functions
31 C++ compiler does not True False NA NA B
allow to dynamically
allocate memory for
objects
32 Given the following class Define the variable Define the Define the variable Age Define the C
class Base { int Age=33; } Age as private variable Age as as private and create a variable Age as
How you can improve protected get method that protected and
above class with respect returns it and a set create a set
to accessing the field method that updates it method that
Age? returns it and a
get
method that
updates it
33 Friend class and friend True False NA NA B
function can be used as
an alternate to each
other
34 Suppose that the Test The automatic The copy Compiler error Run-time error C
class does not have an assignment constructor is
overloaded assignment operator is used used
operator. What happens
when an assignment a=b;
is given for two Test
objects a and b?
35 We achieve Encapsulation Information Abstraction both B
independence of internal Hiding encapsulation
implementation from its and information
external interface hiding
through-----------
36 Which one of the Simple Assocation Inheritance Aggregation Composition B
following is not an object
association?

Safi Khan | Virtual University of Pakistan


72 Computer Science MCQs for NTS / PPSC

37 We capture the object Class Function Data Members Instances A


attributes and behavior in
Object Oriented
programming using--------
-------
38 The return type of a Integer Chracter Double No type D
constructor is of ------------
-
39 Which part of an object Data Operations Any public part Any private part A
exhibits its state?
41 What problem(s) may Dangling pointer Memory All of the given System crash A
occur when we copy Leakage(Object
objects without using is not deleted)
deep copy constructor?
43 _______ remain in Static variables Instance variable Primitive variables None of given A
memory even when all
objects of a class have
been destroyed
44 Friend functions are None of given object member non-member data member C
_____________ functions
of a class
45 ___________, which Friendship is one Friendship is two NO Friendship between Any kind of A
means if A declares B as way only way only classes friendship
its friend it does NOT
mean that A can
access private data of B.
It only means that B can
access all data of A
46 The statement True False NA NA A
objA=objB; will cause a
compiler error if the
objects are of different
classes
48 The technique in which structured object oriented procedural non of the given B
we visualize our programming Programming programming
programming problems
according to real lifes
problems is called ----------
------
49 In object orientated Utilize Borrow Inherit Adopt C
programming, a class of
objects cans
_____________
properties from another
class of objects
50 A C++ class is similar to --- Structure Header File Library File None of the A
----------------- given
51 Information hiding can be Encapsulation, Encapsulation, Encapsulation, Overloading C
achieved Inheritance Polymorphism Abstraction
through__________
52 A good model is Loosely Openly Closely None of Given C
................ related to a
real life problem
Safi Khan | Virtual University of Pakistan
73 Computer Science MCQs for NTS / PPSC

53 Which of the following Encapsulation Polymorphism Data hiding Inheritance D


features of OOP is used to
derive a class from
another?
54 Which of the following is Inheritance Composition Aggregation None of given C
a weak relationship
between two objects?
55 Data items in a class must True False NA NA B
be private
56 Which one is not a class Simple Association Inheritance Composition Aggregation B
association?
58 In constant member Constant pointer Constant pointer Constant pointer to Constant pointer B
function the type of this to object class to constant
pointer is object
59 Which of the following is Generalization Sub-typing Specialization Extension A
the way to extract
common behavior and
attributes from the given
classes and make a
separate class of those
common behaviors and
attributes?
60 The ability to derive a Single inheritance Encapsulation Multiple inheritance Polymorphism C
class from more than one
class is called
61 If MyClass has a MyClass ~MyClass My~Class MyClass~ B
destructor what is the
destructor named?
62 Class abc{ ----- }; Is a valid True False NA NA A
class declaration?
63 Without using Deep copy System crash Memory Leakage Dangling pointer All of the given D
constructor, A
____________ problem
can occur
64 If only one behaviour of a Generalization Specialization Extension Inheritance B
derived class is
incompatible with base
class, then it is
65 Which of the following state behavior Protected data All of given C
may not be an integral members
part of an object?
66 Only tangible things can True False NA NA B
be chosen as an object
67 Consider the code below, public protected private none of the A
class class1{ public: void given options
func1(); }; class class2 :
protected class1 { };
Function func1 of class1 is
______ in class2
68 In case of dynamic User defined User defined Both of these None of these C
memory allocation in a default constructor copy constructor
class we should use,
70 Consider the code below, public protected private none of the B
Safi Khan | Virtual University of Pakistan
74 Computer Science MCQs for NTS / PPSC

class class1{ protected: given options


int i; }; class class2 : public
class1 { }; Then int
member I of class1 is
______ in class2
71 In private inheritance Main function In derived class In base class member None of the C
derived class pointer can member and and friend functions given options
be assigned to base class friend functions
pointer in
72 Child class can call Direct base class Indirect base Both direct and indirect None of these A
constructor of its class base classes
73 Consider the following Default Copy constructor Both default and copy No constructor A
two lines of code written constructor of of student class constructer of Student will be called
for a class Student, 1. Student class class
Student sobj1,sobj2; 2.
sobj2 = sobj1; In line No.2
what constructor of
Student class will be
called,
74 Consider the code below, public protected private none of the A
class class1{ public: int I; given options
}; class class2 : public
class1 { }; Then int
member I of class1 is
______ in class2,
75 We can call base class From derived class From the From any member We can not call A
constructor from derived constructor body initializer list of function of derived the base class
class constructor derived class class constructor
constructor
76 Adding a derived class to True False NA NA B
a base class requires
fundamental changes to
the base class
77 Public Inheritance IS A relationship Has A IS Special Kind of None of these A
represents relationship relationship options
78 A template provides a variables and data functions and classes and exceptions programs and A
convenient way to make members classes algorithms
a family of
79 Which one of the Static allocation Static typing Dynamic binding Dynamic C
following terms must allocation
relate to polymorphism?
80 What is true about The compiler The compiler The compiler can only None of the B
function templates? generates only one generates a copy generate copy for the given.
copy of the of function int type data
function template respective to
each type of
data
81 Which of the following is Templates Overloading Data hiding Encapsulation A
the best approach if it is
required to have more
than one functions having
exactly same functionality
and implemented on

Safi Khan | Virtual University of Pakistan


75 Computer Science MCQs for NTS / PPSC

different data types?


82 template <> class Vector { True False NA NA B
} This is an example of
partial specialization
83 Classes like True False NA NA A
TwoDimensionalShape
and
ThreeDimensionalShape
would normally be
concrete, while classes
like Sphere and Cube
would normally be
abstract.
84 A non-virtual member True False NA NA A
function is defined in a
base class and overridden
in a derived class; if that
function is called through
a base-class pointer to a
derived class object, the
derived-class version is
used
85 Assume a class Derv that public members of protected private members of protected B
is privately derived from Derv members of Derv members of
class Base. An object of Derv Base
class Derv located in
main() can access
86 In order to define a class template typename Template Class Class A
template, the first line of
definition must be
87 When the base class and scope resolution dot operator null operator Operator C
the derived class have a operator overloading
member function with
the same name, you must
be more specific which
function you want to call
(using ___________)
88 Non Template Friend All One specific All instances of one None of the B
functions of a class are date type given options
friends of
________instance/s of
that class
89 The find() algorithm finds matching finds a container takes iterators as its takes container B
sequences of that matches a first two arguments elements as its
elements in two specified first two
containers container arguments
91 Which is not the providing class facilitating class avoiding the rewriting providing a B
Advantage of growth through libraries of code useful
inheritance? natural selection conceptual
framework
92 When a virtual function is True False NA NA A
called by referencing a
specific object by name

Safi Khan | Virtual University of Pakistan


76 Computer Science MCQs for NTS / PPSC

and using the dot


member selection
operator (e.g.,
squareObject.draw()), the
reference is resolved at
compile time
93 In case of multiple Only the public Only the public Both public data Data members C
inheritance a derived member functions data members of members and member and member
class inherits of its base classes its base classes functions of all its base functions of any
classes two base classes
94 When we write a class template < class template < class template < class T > class class- C
template the first line class_name> data_type> name()
must be
95 Which of the following is template template Class template < class C
incorrect line regarding T, class U>
function template?
96 An STL container can not hold objects of store elements compile c++ programs organize the way A
be used to class employee in a way that objects are
makes them stored in
quickly memory
accessible
97 Algorithms can only be True False NA NA A
implemented using STL
containers
98 Consider a class named 1, 4, 5 2, 5, 6 1, 2, 3, 6 1, 5, 6 C
Vehicle, which of the
following can be the
instance of class Vehicle?
1. Car 2. Computer 3.
Desk 4. Ahmed 5. Bicycle
6. Truck
99 Consider the code below, Fred a[10]; calls Produce an error Fred a[10]; calls the Fred a[10]; calls C
class Fred { public: Fred(); the default default constructor 11 the default
-; int main() , Fred constructor 09 times Fred* p = new constructor 10
a[10]; Fred* p = new times Fred* p = Fred[10]; calls the times Fred* p =
Fred*10+; - new Fred[10]; calls default constructor 11 new Fred[10];
the default times calls the default
constructor 10 constructor 10
times times
100 When a variable is define Have different Have same copy Can not access this None of given B
as static in a class then all copies of this of this variable variable
object of this class variable
101 The life of sub object is Separation Composition Aggregation None of the B
dependant on the life of given
master class in
_____________
103 In Private -------------- only specialization inheritance abstraction composition A
member functions and
friend classes or functions
of a derived class can
convert pointer or
reference of derived
object to that of parent

Safi Khan | Virtual University of Pakistan


77 Computer Science MCQs for NTS / PPSC

object
104 A template argument is vector class template type* A
preceded by the keyword
________
105 Which of the following Declaring object of Declaring Declaring overridden None of the D
causes run time binding? abstract class pointer of methods as non-virtual given
abstract class
106 A function template can True False NA NA B
not be overloaded by
another function
template
108 Identify the correct way A< char > obj; A obj; A obj; Obj A; C
of declaring an object of
user defined template
class A for char type
members?
109 The user must define the True False NA NA A
operation of the copy
constructor
110 Template functions use Greater Memory Lesser Memory Equal Memory None of the B
_________ than ordinary given options
functions
111 Compiler performs Static Dynamic Bound Unbound A
________ type checking
to diagnose type errors
112 Which of the following Reusability Writability Maintainability All of given D
is/are advantage[s] of
generic programming?
113 Vectors contain variable array function datatype B
contiguous elements
stored as a[an] ________
114 Suppose you create an The following The following The following The following A
uninitialized vector as statement will add statement will statement will delete statement will
follows: an element to the add an element an element to the end add an element
vector evec; After adding start (the back) of to the center of (the back) of evec and to the end (the
the statement, evec and will evec and will will reinitialize it with back) of evec
evec.push_back(21); initialize it with the reinitialize it the value 21 and initialize it
what will happen? value 21 with the value with the value
21 21
115 In a de-queue, (chose the data can be quickly data can be data can not be quickly data can be D
best option) inserted or deleted inserted or inserted or deleted at inserted or
at any arbitrary deleted at any either end deleted at either
location arbitrary end, but the
location, but the process is
process is relatively slow
relatively slow
116 We can use "this" pointer True False NA NA B
in the constructor in the
body and even in the
initialization list of any
class if we are careful
117 Default constructor is Parameter, Null, Parameter Parameter, default non of the given C
such constructor which temporary
Safi Khan | Virtual University of Pakistan
78 Computer Science MCQs for NTS / PPSC

either has no ---------or if


it has some parameters
these have -------- values
118 Public methods of base directly inderectly simultaniously non of the given A
class can --------- be
accessed in its derived
class
119 The type that is used to default type static type abstract type reference type D
declare a reference or
pointer is called its ---------
120 ------------- members are protected public private global A
somewhere between
public and private
members. They are used
in inheritance
121 Which of these are Abnormal Graceful Return the illegal all of the given D
examples of error Termination Termination
handling techniques ?
122 ----------------- follow try catch block throw block main block non of the given A
block to catch the object
thrown
123 Graphical representation Class Name only Class Name and Relationships of the all of the given D
of the classes and objects attributes objects and classes
is called object model it
shows - ------
124 Destructor can be True False NA NA B
overloaded
125 Outside world can access Public Private Protected No member is A
only __________ accessible
members of a class using
its object
126 Consider the code below, Public Private Protected none of the C
class class1{ private: int i; given options
}; class class2 : protected
class1 { }; Then int
member I of class1 is
______ in class2,
127 In Public Inheritance the Public Private Protected none of the A
public members of base given options
class become __________
in derived class
128 Consider the code below, Public Private Protected none of the A
class class1{ protected: given options
int i; }; class class2 : public
class1 { }; Then int
member I of class1 is
______ in class2
129 Multiple inheritance can Public Private Protected All of the given D
be of type
130 When a subclass specifies overload overriding copy riding none of given B
an alternative definition
for an attribute or
method of its superclass,
Safi Khan | Virtual University of Pakistan
79 Computer Science MCQs for NTS / PPSC

it is _______ the
definition in the
superclass
131 It is sometimes useful to True False NA NA B
specify a class from which
no objects will ever be
created
132 A pointer to a base class True False NA NA A
can point to objects of a
derived class
133 A copy constructor is a function do not an argument is a function returns by an argument is C
invoked when returns by value passed by value reference passed by
reference
134 A function call is resolved non-virtual virtual member Both non-virtual None of given B
at run-time member function function member and virtual
in___________ member function
135 Each try block can have 1 2 3 As many as D
______ no. of catch necessary
blocks
136 Two important STL set,map sequence,mappi setmet,multipule sit,mat B
associative containers are ng
_______ and _______
137 The mechanism of late binding static binding virtual binding None of the D
selecting function at run given options
time according to the
nature of calling object is
called
138 An abstract class is useful We do not derive There are We do not want to You want to C
when any class from it multiple paths instantiate its object defer the
from one declaration of
derived class to the class
another
139 By default the vector data 0 0.0 1 null A
items are initialized to
____
140 Which one of the length(); size(); ele(); veclen(); B
following functions
returns the total number
of elements in a vector
141 Suppose you create an The following The following The following The following D
uninitialized vector as statement will add statement will statement will delete statement will
follows: vector evec; an element to the add an element an element to the end add an element
After adding the start (the back) of to the center of (the back) of evec and to the end (the
statement, evec and will evec and will will reinitialize it with back) of evec
evec.push_back(21); initialize it with the reinitialize it the value 21 and Qinitialize it
what will happen? value 21 with the value with the value
21 21
142 The main function of To define an object o define a data To link the definition of To make a class A
scope resolution operator member an identifier to its private
(::) is declaration
143 When is a constructor Each time the During the During the construction At the beginning B
called? constructor instantiation of a of a new class of any program
identifier is used in new object execution
Safi Khan | Virtual University of Pakistan
80 Computer Science MCQs for NTS / PPSC

a program
statement
144 Associativity can be True False NA NA B
changed in operator
overloading
145 A normal C++ operator glorified encapsulated classified overloaded C
that acts in special ways
on newly defined data
types is said to be
146 Which one is not an Simple association Inheritance Aggregation Association B
object association?
147 Without using Deep copy System crash Memory Leakage Dangling pointer All of the given D
constructor, A
____________ problem
can
148 Class is not a mechanism true false NA NA B
to create objects and
define user data types
149 Memory is allocated to Class is created Object is defined Object is initialized Object is created C
non static members only,
when
150 The sub-objects life is Composition Aggregation Separation non of the given B
not dependent on the life
of master class in
___________
151 Unary operators and true false NA NA A
assignment operator are
right associative
152 _____ is creating objects Association Composition Aggregation Inheritance D
of one class inside
another class
153 If we are create array of We can call We cant call We can call default None of the A
objects through new overloaded overloaded constructor through given
operator, then constructor constructor new
through new through new
154 Object can be declared true false NA NA A
constant with the use of
Constant keyword
155 __________ Operator will New int object none of the A
take only one operand given
156 Which of the following ++ * % All of the given A
operator(s) take(s) one or choices
no argument if
overloaded?
157 this pointer does not pass Static Member Non-Static Instance Number None of the A
implicitly to __________ Member given
functions
158 Operator overloading is making C++ giving C++ giving new meanings to making new C++ A
operators work operators more existing Class members operators
with objects than they can
handle
159 If a class A inherits from Child class Derived class Parent class Child and B
class B, then class A is derived class
Safi Khan | Virtual University of Pakistan
81 Computer Science MCQs for NTS / PPSC

called
160 If some of objects exhibit Different classes Multiple classes Same class None of the C
identical characteristics, given
then they belong to
161 ________ is automatically member function object constructor None of the C
called when the object is given
created
162 If a class involves dynamic Default copy User defined Default copy User defined A
memory allocation, thenA constructor, copy constructor, deep copy copy
shallow copy is constructor, is implemented constructor,
implement shallow copy is deep copy is
impl implem
163 Which one is a not class Simple Association Inheritance Composition Aggregation B
association
164 Three main Encapsulation,dyna polymorphism, encapsulation, encapsulation, C
characteristics of "Object mic overloading, inheritance, dynamic inheritance,
Oriented programming" binding,polymarhp overriding binding polymorphism
are ishm
165 The sentence Object Association Multiple Aggregation none of the C
Oriented Programming association given
book in bookshelf is an
example of
166 Data members are the true false NA NA A
attributes of objects
167 Constructor have same true false NA NA A
name as the class name
168 An abstract class shows Overriding Specific General None of the C
____________ behaviour given
169 Consider the statement Inheritance Composition There is no association Aggregation D
room has chair Which
of the following type of
association exists
between room and chair?
170 The dot operator (or class A class member A class object A class and a member A class object C
member access operator) and a class object and a class of that class and a member
connects the following of that class
two entities (reading
from left to right):
171 Like template functions, a True False NA NA A
class template may not
handle all the types
successfully
172 A class template may True False NA NA A
inherit from another class
template
173 Classes like True False NA NA A
TwoDimensionalShape
and
ThreeDimensionalShape
would normally be
concrete, while classes
like Sphere and Cube
would normally be
Safi Khan | Virtual University of Pakistan
82 Computer Science MCQs for NTS / PPSC

abstract
174 Which one is a class Simple Association Inheritance Composition Aggregation B
association
175 The sub-objects life is Composition Aggregation Separation non of the given B
not dependent on the life
of master class in
___________
177 The >= operator can't be True False NA NA B
overloaded
178 __________ provide the accesser function private function inline function None of the A
facility to access the data given
member
179 Constant objects cannot True False NA NA A
change their state
180 The ________ has-a is-a be- None of given D
relationship indicates that
an object contains other
objects
181 _______ is a relationship Inheritance Polymarphism abstraction encapsulation A
182 ________ and ______ private,static private,public static,public none of given A
methods may not be
declared abstract
183 Suppose we have two No Only if the two Only if the main Yes B
derived classes from a classes have the program does not
single class, can we write same name declare both kinds
a method with same
name in both these
derived classes? Choose
the best option
184 When a virtual function is True False NA NA B
called by referencing a
specific object by name
and using the dot
member selection
operator (e.g.,
squareObject.draw()), the
reference is resolved at
compile time
185 Considering the general template partial complete specialization ordinary D
resolution order in which specialization function
Considering the
resolution order in which
compiler search for
functions in a program;
the first priority is given
to; the first priority is
given to
186 One purpose of an True False NA NA A
iterator in the STL is to
connect algorithms and
containers
187 In ________, a base class Sub-typing Super-typing Multiple-typing Restricted- A
can be replaced by its typing
Safi Khan | Virtual University of Pakistan
83 Computer Science MCQs for NTS / PPSC

derived class
188 this pointer does not True False NA NA B
point to current object of
any class
189 Which of the following Scope resolution Insertion Extraction operator ( >> The relation A
operators can not be operator ( :: ) operator ( << ) ) operator ( > )
overloaded?
190 Virtual functions allow create an array of create functions group objects of use the same D
you to type pointer-to- that can never different classes so they function call to
base class that can be accessed can all be accessed by execute member
hold pointers to the same function code functions of
derived classes objects from
different classes
191 The copy() algorithm the last element the last element the element one past the element one D
returns an iterator to copied from copied to the last element copied past the last
from element copied
to
192 a vector v with the 11 for v and 3 for 0 for v and 0 for 0 for v and 3 for w 3 for v and 11 D
default constructor, w w for w
another vector w with a
one-argument
constructor to a size of
11, and insert 3 elements
into each of these vectors
with push_back(), then
the size() member
function will
return____for v
and____for w
193 class X : public A, public B Single inheritance Multiple Double inheritance None of the B
{ ... ... }; inheritance given options
194 Function templates True False NA NA A
should be used where
code and behavior must
be identical
195 The specialization pattern data type meta type virtual type pointer type D
after the name says that
this specialization is to be
used for every
196 A range is often supplied italic iteration iterator None of given B
to an algorithm by two
_______ values
197 Which of the following is State Behavior Unique identity All of the given D
an integral part of an
object?
198 Consider the following Composition Aggregation Inheritance None of the B
statement Cupboard has given options
books What is the
relationship between
Cupboard and books?
199 Which sentence clearly one instance of a another word for a class with static a method that A
defines an object? class a class methods accesses class
attributes
Safi Khan | Virtual University of Pakistan
84 Computer Science MCQs for NTS / PPSC

200 If a class D has been can be cannot be does restirct to be not given A
derived using protected
inheritance from class B
(If B is a protected base
and D is derived class)
then public and protected
members of B --------
accessed by member
functions and friends of
class D and classes
derived from D
201 a pointer p to objects of a Base Derived Abstract virtual A
base class & it contains
the address of an object
of a derived class & both
classes contain a
nonvirtual member
function ding() ding(),
then the statement p-
>ding();version of ding()
in the _____ class to be
executed

Safi Khan | Virtual University of Pakistan


85 Computer Science MCQs for NTS / PPSC

CS401-Assembly Language Program


ID Qus A B C D Ans
1 The physical address of the stack is SS:SI SS:SP ES:BP ES:SP B
obtained by combination combination combination combination
2 Foreground and background 32bits 16bits 8bits 4bits C
parameter will be
3 The clear screen operation initialize 0741 0417 0714 0174 D
whole block of memory
4 In STOSB instruction, when DF is Set, Incremented by Incremented by Decremented by Decremented C
SI is 1 2 1 by 2
5 Assembly language is: Low-level High-level Also known as Not considered A
programming programming machine closer to the
language language language computer
6 A 32 Bit processor has accumulator 8 bit 16 bit 32 bit 64 bit C
of ___________
7 To transfer control back the RET Register Stack Data segment Code segment B
instruction take
8 To convert any digit to its ASCII Add 0x30 in the Subtract 0x30 Add 0x61 in the Subtract 0x61 A
representation digit from the digit digit from the digit
9 The prevalent convention in most Caller Callee RET Stack B
high level languages is stack clearing
by the
10 After execution of JCXZ instruction CF OF DF None of Above D
CX will changed with flag affect.
11 Execution of the instruction mov A appear on A appear on A appear on A appear on A
word *ES : 0+, 0x0741 will print the top left of the top right of the center of the bottom left
screen screen screen of screen
12 if contains decimal -2 and BX Jump will be Zero flag will set ZF will contain Jump will not A
contains decimal 2 then after the taken value -4 be taken
execution of instructions: CMP AX,
BX JA label
13 Which of the following options mov AX, 0xb008 mov AX, 0xb800 mov AX, 0x8b00 mov AX, B
contain the set of instructions to mov ES, AX mov ES, AX mov ES, AX 0x800b mov ES,
open a window to the video AX
memory?
14 After the execution of SAR The msb is The msb is The msb retains The msb is D
instruction replaced by a 0 replaced by 1 its original value replaced by the
value of CF
15 RETF will pop the offset in the BP IP SP SI B
16 The routine that executes in ISR IRS ISP IRT A
response to an INT instruction is
called
17 The first instruction of COM file 0x0010 0x0100 0x1000 0x0000 B
must be at offset:
18 Far jump is not position relative Memory Absolute Temporary Indirect B
but is _________ dependent
19 After the execution of instruction SP is SP is SP is SP is C
RET 2 incremented by decremented by incremented by 4 decremented
2 2 by 4
20 DIV instruction has Two forms Three forms Four forms Five forms A
21 When the operand of DIV 8 bits 16 bits 32 bits 64 bits A
instruction is of 16 bits then implied
Safi Khan | Virtual University of Pakistan
86 Computer Science MCQs for NTS / PPSC

dividend will be of
22 After the execution of MOVS SI only DI only SI and DI only SI, DI and BP C
instruction which of the following only
registers are updated
23 In 8088 architecture, whenever an SP is SP is SP is SP is B
element is pushed on the stack decremented by decremented by decremented by decremented
1 2 3 by 4
24 When a very large number is divided Divide logical Divide overflow Divide syntax An illegal B
by very small number so that the error error error instruction
quotient is larger than the space
provided, this is called
25 In the word designated for one The character The attribute The parameters The dimensions B
screen location, the higher address code byte
contains
26 In a video memory, each screen One byte Two bytes Four bytes Eight bytes B
location corresponds to
27 After the execution of PUSH AX AX register will A copy of AX will The value of AX Stack will send B
statement reside on the go on the stack disappear after an acceptance
stack moving on stack message
28 If the address of memory location 0005 0117 Num1 1701 B
Num1 is 0117 and its content is
0005 then after execution of the
instruction mov bx, Num1 bx will
contain
29 In STOS instruction, the implied AL or AX DL or DX BL or BX registers CL or CX A
source will always be in registers registers registers
30 The shift logical right operation A zero at right A zero at left A one at right A one at right B
inserts
31 assembly the CX register is used source counter index pointer B
normally as a
______________register.
32 Which is the unidirectional bus ? (I) I only II only III only I and II only C
Control Bus (II) Data Bus (III)
Address Bus
33 The basic function of SCAS Compare Scan Sort Move data A
instruction is to
34 _______ register holds the address Base pointer Code segment Source index Program D
of next instruction is to be executed counter
35 JC and JNC test the ____________ carry parity zero sign A
flag.
36 After the execution of REP CF OF DF No flags will be D
instruction CX will be decremented affected
then which of the following flags will
be affected?
37 In string manipulation whenever an ES: DI ES: BP DS:BP DS:SI D
instruction needs a memory source,
which of the following will hold the
pointer to it?
38 which bit sets the character 5 6 7 8 C
"blinking" on the screen?
39 If we want to divide a signed SHR SAR SHL SAL B
number by 2, this operation can

Safi Khan | Virtual University of Pakistan


87 Computer Science MCQs for NTS / PPSC

better be accomplished by
40 After the execution of STOSB,the CX Incremented by Incremented by Decremented by Decremented C
wil be__________ 1 2 1 by 2
41 shifting the -15 two bit sAR -7 7 -8 8 B
42 mov ax,5 has 1 operand 2 opeand 3 operand 4 opeand B
43 Index registers are used to store Data Intermediate Address Both data and C
__________ result addresses
44 The bits of the _____________ work index register base register flags register accumulator C
independently and individually
45 When a 32 bit number is divided by 4 bits 8 bits 16 bits 32 bits C
a 16 bit number, the quotient is of
46 Which mathematical operation is Division Multiplication Addition Subtraction D
dominant during the execution of
SCAS instruction
47 The execution of the instruction Second column First column of Second column First column of B
mov word *ES : 160+, 0x1230 will of first row second row of second row third row
print a character 0 on the screen
at
48 If the direction of the processing of ZF is cleared DF is cleared ZF is set DF is set D
a string is from higher addresses
towards lower addresses then
49 The instruction ADC has________ 0 1 2 3 D
Operand(s)
50 Suppose AL contains 5 decimal then 5 10 15 20 B
after two left shifts produces the
value as
51 The operation of CMP is to Subtract Source Subtract Add 1 to the Add Source A
from Destination Destination to Destination and Destination
from Source
52 The registers IP, SP, BP, SI, DI, and 8-bit 16-bit 32-bit 64-bit B
BX all can contain a ________offset.
53 Which bit of the attributes byte 0 1 2 3 A
represents the blue component of
foreground color
54 When a 32 bit number is divided by AX BX CX DX A
a 16 bit number, the quotient will
be stored in
55 Which of the following flags will be DF PF ZF No effect on D
affected by MOVSW? flags
56 Which bit of the attributes byte 3 4 5 6 B
represents the blue component of
background color ?
57 In STOSB instruction SI is 1 2 3 4 A
decremented or incremented by
58 CMPS instruction subtracts the DS:SI DS:DI ES:SI ES:DI D
source location to the destination
location. Destination location
always lies in
59 Regarding assembler, which Assembler Assembler Assembler Assembler A
statement is true: converts converts executes the executes the
mnemonics to OPCODE to the assembly code all assembly code
the corresponding at once step by step

Safi Khan | Virtual University of Pakistan


88 Computer Science MCQs for NTS / PPSC

corresponding mnemonics
OPCODE
60 If BB is the OPCODE of the 0xBB0150 0x5001BB 0x01BB50 0xBB5001 D
instruction which states to move a
constant value to AX register, the
hexadecimal representation (Using
little Endian notation) of the
instruction Mov AX,336 (150 in
hexadecimal number system) will
be:
61 In the instruction MOV AX, 5 the 1 2 3 4 B
number of operands are
62 The maximum parameters a 6 7 8 9 B
subroutine can receive (with the
help of registers) are
63 In Left-Shift-Operation the left most will drop will go into CF Will come to the will be always 1 B
bit _______ right most
64 When divide overflow occurs Hardware Software Processor Logical A
processor will be interrupted this interrupt interrupt exception interrupts
type of interrupt is called
65 _________ is one of the reasons due Efficiency and Reduction in Reduction in Reduction in C
to which string instructions are used accuracy code size and code size and code size and
in 8088 accuracy speed efficiency
66 In graphics mode a location in video line dot circle rectangle B
memory corresponds to a
_____________ on the screen.
67 Creation of threads can be static dynamic easy difficult B
68 The thread registration code assembler scheduler linker debugger B
initializes the PCB and adds it to the
linked list so that the __________
will give it a turn.
69 VESA VBE 2.0 is a standard for High resolution Low resolution Medium Very High A
Mode Mode resolution Mode resolution
Mode
70 Which of the following gives the BIOS DOS Both None B
more logical view of the storage
medium
71 Which of the following IRQs is IRQ 0 IRQ 1 IRQ 2 IRQ 3 B
derived by a key board?
72 Which of the following IRQs is used IRQ 4 IRQ 5 IRQ 6 IRQ 7 C
for Floppy disk derive?
73 Which of the following pins of a 10-18 18-25 25-32 32-39 B
parallel port connector are
grounded?
74 The physical address of IDT( GDTR IDTR IVT IDTT B
Interrupt Descriptor Table) is stored
in _______
75 In NASM an imported symbol is Global directive, External Home Directive, Foreign B
declared with the _____________ External directive, Global Foreign Directive Directive,
while and exported symbol is directive directive Home Directive
declared with the_______________
76 In 68K processors there is a 8bit 16bit 32bit 64bit C
___________ program counter (PC)
Safi Khan | Virtual University of Pakistan
89 Computer Science MCQs for NTS / PPSC

that holds the address of currently


executing instruction
77 To reserve 8-bits in memory ___ db dw dn dd A
directive is used.
78 In the mov ax, 5 5 is the source destination memory register A
__________ operand.
79 RETF will pop the segment address CS register DS register SS register ES register A
in the
80 For the execution of the instruction AX BX CX DX A
DIV BL, the implied dividend will
be stored in
81 When a number is divided by zero INT 0 INT 1 INT 2 This interrupt is D
A Division by 0 interrupt is generated
generated. Which instruction is used automatically
for this purpose
82 INT 21 service 01H is used to read AL BL CL BH A
character from standard input with
echo. It returns the result in ______
register.
83 BIOS sees the disks as logical storage raw storage in the form of in the form of B
sectors only tracks only
84 In 9pin DB 9, which pin number is 1 2 3 4 A
assigned to CD (Carrier Detect)?
85 In 9pin DB 9, Signal ground is 3 4 5 6 C
assigned on pin number
86 In 9pin DB 9, RI (Ring Indicator) is 6 7 8 9 D
assigned on pin number
87 Motorola 68K processors have 4 16 32 64 C
_____________ 23bit general
purpose registers.
88 When two devices in the system An IRQ Collision An IRQ Conflict An IRQ Crash An IRQ B
want to use the same IRQ line then Blockage
what will happen?
89 Which flags are NOT used for Carry, Interrupt Direction, Direction, Direction, B
mathematical operations ? and Trap flag. Interrupt and Overflow and Interrupt and
Trap flag. Trap flag. Sign flag.
90 Value of AH in the write Graphics 0Ch 0Bh 1Ch 2Ch A
pixel service is
91 Threads can have function calls, global local legal illegal B
parameters and __________
variables.
92 Creation of threads can be static dynamic easy difficult B
93 How many prevalent calling 1 2 3 4 B
conventions do exist
94 The serial port connection is a 9pin DB 9 8pin DB 9 3pin DB 9 9pin DB 5 A
__________ connector
95 In STOSB instruction, when DF is Incremented by Incremented by Decremented by Decremented A
clear, SI is 1 2 1 by 2
96 After the execution of STOSW the Decremented by Decremented by Incremented by 1 Incremented by A
CX will be 1 2 2
97 IRQ is referred to Eight input One output One input signals Eight output A
signals signal signals

Safi Khan | Virtual University of Pakistan


90 Computer Science MCQs for NTS / PPSC

98 Which of the following IRQs is IRQ 4 IRQ 5 IRQ 6 IRQ 7 A


connected to serial port COM 1?
99 The number of bits required to 16 bits 20 bits 32 bits Depends on the D
access 1MB of memory are processor
architecture
100 In programmable interrupt 19 20 21 22 B
controller, which of the following
ports is referred as a control port.
101 In device attribute word, which of Bit 12 Bit 13 Bit 14 Bit 15 D
the following bit decides whether it
is a character device or a block
device
102 In 9pin DB 9, which pin number is 6 7 8 9 C
assigned to CTS (Clear To Send) ?
103 In 9pin DB 9, which pin number is 1 2 3 4 B
assigned to RD (Received Data) ?
104 VESA(Video Electronics Standards 5:5:5 format 5:6:5 format 6:5:6 format 5:6:7 format B
Association) organizes 16 color bits
for every pixel in
105 Programmable Interrupt Controller One input One input signal Eight input Eight input C
(PIC) has signals and eight and one output signals and one signals and
output signals signal output signals eight output
signals
106 Video services are classified into 2 3 4 5 A
______________ broad categories.
107 BL contains 5 decimal then after 2.5 3 5 10 A
right shift , BL will become
108 8 * 16 font is stored in ________ 3 4 8 16 D
bytes.
109 In DOS input buffer , number of First byte Second byte Third byte Fourth byte B
characters actually read on return is
stored in
110 IRQ 0 has priority Low High Highest Medium C
111 Traditional calling conventions are 1 2 3 4 B
in ______ number
112 To clear direction flag which Cld Clrd Cl df Clr df A
instruction is used
113 In STOSW instruction , When DI is Incremented by Incremented by Decremented by Decremented B
cleared , SI is 1 2 1 by 2
114 Interrupt that is used in debugging INT 0 INT 1 INT 2 INT 3 B
with help of trap flag is
115 INT for arithmetic overflow is INT 1 INT 2 INT 3 INT 4 D
116 IRQ referred as Eight Input One Input signal Eight Output One output A
signals signals signal
117 IRQ for keyboard is ________ 1 3 5 6 A
118 IRQ for sound card is ______ 1 3 5 6 C
119 IRQ for floppy disk is ______ 1 3 5 6 D
120 IRQ with highest priority is Keyboard IRQ Timer IRQ Sound Card Floppy Disk B
121 CX register is Count register Data register Index register Base register A
122 OUT instruction uses _______ as AX AL AX or AL None of above C
source register.
123 IN DB-9 connector the Data Set 5 6 7 8 B
Safi Khan | Virtual University of Pakistan
91 Computer Science MCQs for NTS / PPSC

ready pin is at
124 SP is associated with _________ By SS DS CS ES A
default
125 Which bit of the attributes byte 2 3 4 5 A
represents the red component of
foreground color
126 In DOS input buffer, the number of third fourth first second D
characters actually read on return is
stored in ___________ byte.
127 Which of the following interrupts is INT 0 INT 1 INT 2 INT 3 C
Non maskable interrupt
128 Which of the following IRQs is IRQ 0 IRQ 1 IRQ 2 IRQ 3 D
connected to serial port COM 2?
129 The time interval between two 40ms 45ms 50ms 55ms D
timer ticks is?
130 In 68K processors there is a 32bit Program counter Stack pointer Register Stack A
____________ that holds the
address of currently executing
instruction
131 Single step interrupt is Hardware Like divide by Like divide by 1 Software B
interrupt zero interrupt interrupt interrupt
132 Which of the following is NOT true Their operation Intermediate They are also None of given D
about registers: is very much like results may also called scratch options
memory be stored in pad ram
registers
133 Types of jump are: short, near short, near, far near, far short, far B
134 MS DOS uses ____ display mode. Character based Graphics based Numeric based Console based A
135 Which of the following IRQs is IRQ 0 IRQ 1 IRQ 2 IRQ 3 A
derived by a timer device?
136 In 9pin DB 9, which pin number is 4 5 6 7 C
assigned to DSR (DataSet Ready) ?
137 In 9pin DB 9 CTS is assigned on pin 6 7 8 9 C
number
138 8088 is a ___________ 16 bit processor 32 bit processor 64 bit processor 128 bit A
processor
139 The table index (TI) is set to _____ -2 -1 0 1 C
to access the GDT (Global Descriptor
Table).
140 In 9pin DB 9 DSR is assigned on pin 4 5 6 7 C
number
141 In 9pin DB 9 CD is assigned on pin 1 2 3 4 A
number
142 A 32bit address register can access 2GB 4GB 6GB 8GB B
upto ...access has .of memory so
memory increased a lot.
143 Which of the following IRQ is IRQ 0 IRQ 1 IRQ 2 IRQ 3 C
cascading interrupt
144 An End of Interrupt (EOI) signal is Handler Processor IRQ PIC A
sent by
145 The number of pins in a parallel port 20 25 30 35 B
connector are?
146 move [bp], al moves the one byte Stack segment Code segment Data segment Extra segment A

Safi Khan | Virtual University of Pakistan


92 Computer Science MCQs for NTS / PPSC

content of the AL register to the


address contained in BP register in
the current
147 In a rotate through carry right (RCR) 16 bits rotation 1 bit rotation 17 bits rotation 8 bits rotation C
instruction applied on a 16 bit word
effectively there is
148 The 8088 stack works on Word sized Byte sized Double sized Nible sized A
elements elements element element
149 INT 10 is used for __________ RAM Disk BIOS video DOS video C
services
150 In device attribute word which of Bit 12 Bit 13 Bit 14 Bit 15 D
the following bit decides whether it
is a character device or a block
device
151 Video services are classified into 2 3 4 5 A
__________ broad categories
152 The process of sending signals back Activity Hand-shaking Interruption Time clicking D
and forth is called
153 Which of the following is a special Divide overflow Debug interrupt Arithmetic Change of sign A
type of interrupt that returns to the interrupt overflow interrupt
same instruction instead of the next interrupt
instruction?
154 In programmable interrupt 19 20 21 22 C
controller which of the following
ports is used for selectively enabling
or disabling interrupts
155 When the subprogram finishes, the RET instruction CALL instruction POP instruction Jump A
_____________ retrieves the return instruction
address from the stack and transfers
control to that location.
156 The value of a segment register segment segment selector global descriptor protected A
when the processor is running descriptor table register
under protected mode is called
_________
157 FS and FS and GS are two ________ segment segment stack pointers register B
in protected mode. registers selectors pointers
158 IDT stands for __________ interrupt individual inline data table interrupt A
descriptor table descriptor table descriptor table
159 Every bit of line status in serial port different same partial full A
conveys _____________
information.
160 There are total _______________ 1444k 1440k 1280k 2480k B
bytes in a standard floppy disk.
161 Memory address space is selected MOV DEC IN ADD A
when which of the following
instructions is given to the
processor?
162 PCB stands for? Process Control Process Clearing Programmable Programs A
Block Block Counter Block Control Block
163 The input frequency of the Fixed Depends on Variable Depends on A
programmable interval timer (PIT) is processor clock hardware
attached

Safi Khan | Virtual University of Pakistan


93 Computer Science MCQs for NTS / PPSC

164 Programmable interrupt controller The Interrupt Interrupt port Output port Input port A
has two ports 20 and 21. Port 20 is mask register
the control port while port 21 is
___________
165 The time interval between two 40ms 45ms 50ms 55ms D
timer ticks is ?
166 Which of the following interrupts is INT0 INT6 INT7 INT8 D
used for saving and restoring the
registers
167 In programmable interrupt 19 20 21 22 C
controller which of the following
ports is referred as a interrupt mask
register?
168 The programmable interval timer 1.193MHZ 2.192MHZ 3.196MHZ 4.198MHZ A
(PIT) has input frequency of
169 Peripheral address space is selected MOV IN Add Out B
when which of the following
instructions is given to the
processor?
170 Direction flag, the interrupt flag, and used for not used for status flags not status flags B
the trap flag are mathematical mathematical
operations operations
171 The space where all the registers of control block process control stack memory A
a task are stored is called the block
172 Which of the following interrupt is Key board Timer interrupt INT 2 INT 3 B
of highest priority interrupt? interrupt
173 The instruction used to read a in al, 0x60 out al, 0x60 in al, 0x80 out al, 0x80 A
character from the keyboard port is
174 Each thread can have their own execution area stack memory array B
175 There is no instruction to clear the Trap flag Interrupt flag Direction flag None of the A
above
176 The interrupt mask register which Port 19 Port 20 Port 21 Port 22 C
can be used for selectively enabling
or disabling interrupts is associated
with
177 The parallel port connector is DB-25 BD-25 DB-24 BD-24 A
called?
178 The first instruction of COM file 0x0010 0x0100 0x1000 0x0000 B
must be at offset:
179 The execution of the instruction Black White Red Blue A
mov word *ES : 0+, 0x0741 will
print character A on screen ,
background color of the screen will
be
180 The iAPX888 architecture consists of 12 14 16 18 C
_______ register.
181 One screen location corresponds to Byte Word Double byte Double word B
a
182 When an item is pushed on the First First Decremented Incremented A
decrementing stack, the top of the decremented incremented and after the element after the
stack is and then then element copied on to the element copied
element copied copied on to the stack on to the stack

Safi Khan | Virtual University of Pakistan


94 Computer Science MCQs for NTS / PPSC

on to the stack stack


183 Each screen location corresponds to The character The attribute The parameters The dimensions A
a word, the lower byte of this word code byte
contains _________
185 If D is 35 is shift to left 2 bits the 17 35 70 140 D
new value
186 When two 16bit numbers are added carry flag Parity Flag Auxiliary Carry Zero Flag A
the answer can be 17 bits long, this
extra bit that wont fit in the target
register is placed in the where it can
be used and tested
187 Only instructions allow moving data string word indirect stack A
from memory to memory.
188 When a 16 bit number is divided by AL AX AH DX A
an 8 bit number, the quotient will
be in
189 Which bit of the attributes byte 3 4 5 6 D
represents the red component of
background color ?
190 | 0 |--| 1 | 1 | 0 | 1 | 0 | 0 | 0 | --| Shl sar Shr Sal C
C | is a example of ______
191 allow changing specific processor Special Data Movement Program Control Arithmetic and A
behaviors and are used to play with Instructions Instructions Instructions Logic
it. Instructions
192 8088 is a 16bit processor with its 6 bits 16 bits 32 bits 64 bits B
accumulator and all registers of
__________.
193 decrements SP (the stack pointer) PUSH POP CALL RET A
by two and then transfers a word
from the source operand to the top
of stack
194 In instruction ADC the operands can Two register Two register and CF and two other ZF and two C
be only one memory operands other operands
location
195 After the execution of instruction SP is SP is SP is SP is A
RET incremented by decremented by incremented by 1 decremented
2 2 by 1
196 The extended ASCII has 64 characters 128 characters 256 characters 502 characters B
197 The second byte in the word The dimension Character Character color ACSII code of C
designated for screen location holds of the screen position on the on the screen the character
screen
198 REP will always Incremented CX Incremented CX Decremented CX Decremented C
by 1 by 2 by 1 CX by 2
199 The routine that executes in ISR IRS ISP IRT A
response to an INT instruction is
called
200 The iAPX888 architecture consists of 12 14 16 18 C
_______ register.
201 In the instruction CMP AX,BX the AX are changed BX are changed CX are changed Flag register D
contents of are changed
202 All the addressing mechanisms Effective faulty indirect direct A
iniAPX88 return a number called

Safi Khan | Virtual University of Pakistan


95 Computer Science MCQs for NTS / PPSC

______ address.
203 The execution of the instruction will clear next will print 20 at will print 20 at will move DI at A
mov word *ES: DI+, 0x0720 character on top left of the top right of the location 0720
screen screen screen on the screen
204 mov byte *num1+,5 is _______ legal illegal stack based memory A
instruction. indirect
205 MOV instruction transfers a byte or DS:DI ES:SI ES:DI DS:SI D
word from which of the following
source location.
206 If the decimal number 35 is 35 70 140 17 C
shifted by two bit to left, the new
value will be
207 While using STOBS, if DF=1 then The value of SI The value of SI The value of SI The value of SI C
will be will be will be will be
incremented by incremented by decremented by decremented
one two one by two
208 After the execution of STOSW, the Decremented by Decremented by Incremented by 1 Incremented by B
CX will be 1 2 2
209 The memory address always move processor to memory to memory to peripheral to A
from memory processor peripheral processor
210 An offset alone is not complete Segment code label index register data label A
without
211 Code Segment is associated to IP SS BP CX A
_______ register by default.
212 After the execution of SAR MSB remain as it MSB Will change MSB move to left No change will C
instruction: is occur.
213 The screen is two dimensional space 25 Rows and 25 25 Rows and 80 80 Rows and 80 80 Rows and 25 D
having: Columns Columns Columns Columns
214 In the Rotate Right Operation every Dropped in CF Moves to AL Dont go None of given A
bit moves one position to right and anywhere.
the bit dropped from the right is
inserted at the left and:
215 ____________ of the following flags DF ZF PF No effect on A
will be affected by MOVSB? flags
216 The iAPX88 processor supports 5 6 7 8 C
___________ modes of memory
access.
217 Stack is a ______ that behaves in a Program Data structure Heap None of the B
first in last out manner. Given
218 execution of the instruction mov Black White Red Blue B
word *ES : 0+, 0x0741 will print
character A on screen, color of the
character will be
219 There are three busses to address addressing address address D
communicate the processor and bus.,data bus bus.,data bus bus.,datamove bus.,data bus
memory named as ___________ and data bus and data bus bus and data bus and control bus
220 The address bus is unidirectional True False NA NA A
and address always travels from
processor to memory
221 Data bus is bidirectional To way Data moves from Data moves from None of the C
because________ both, processor both, processor Given
to memory and to memory and

Safi Khan | Virtual University of Pakistan


96 Computer Science MCQs for NTS / PPSC

memory to memory to data


processor Bus
222 Control bus________ is Not Important is Important bidirectional unidirectional C
223 A memory cell is an n-bit location to 4-bit 8-bit 6-bit 80-bit B
store data, normally ________also
called a byte
224 The number of bits in a cell is called Cell width and cell number and width Height A
the cell width.______________ number of cells width of the cells
define the memory completely
225 For memory we define two parallel Vertical long short A
dimensions. The first dimension
defines how many __________bits
are there in a single memory cell

Safi Khan | Virtual University of Pakistan


97 Computer Science MCQs for NTS / PPSC

CS402-Theory of Automata
ID Qus A B C D Ans
1 The CFG is said to be ambiguous if One Two More than one At most one C
there exist at least one word of its
language that can be generated by
the production trees
2 In a STACK The element The element The element None of given B
PUSHed first is PUSHed first is PUSHed in last options
POPed first POPed in the last is POPed in
last
3 Consider the following CFG: S X Y S,X and Y B
(NOTE: ^ means NULL) S-
>a|Xb|aYa X->Y|^ Y->b|X Which
Nonterminal(s) is/are NOT nullable
4 If a CFG has only productions of PDA form Chomsky Normal NULL able Unit production B
the form nonterminal -> string of Form (CNF) form form
two nonterminals or nonterminal -
> one terminal then the CFG is said
to be in _________
5 The structure given below is called RE TG CFG PDA C
_________ S -> aA|bB A -> aS|a B
-> bS|b
6 (a* + b*)* = (a + b)* this True False NA NA B
expression is __________
7 The states in which there is no way Davey John Dead States Waste Baskets All of the given D
to leave after entry are called Lockers options
8 If S = {ab, bb}, then S* will not Abbbab Bbba ababbb bbbbab B
contain
9 According to theory of automata 1 2 3 4 B
there
10 What do automata mean? Something done Something done Both of these None of these B
manually automatically
11 What is false about the term It is a finite set of It is usually It can be an Strings are C
alphabet? symbols denoted by empty set made up of its
Greek letter elements
sigma
12 Formal is also known as Syntactic Semantic Informal None of these A
_________ language language language
13 Kleene star closure can be defined Over any set of Over specific Over any set Over specific A
string type of string of language type of
language
14 While finding RE corresponding to A B null string None of the C
TG, we connect the new start state given options
to the old start state by the
transition labeled by
15 (a* + b*)* = (a + b)* this True False NA NA B
expression is __________
16 The states in which there is no way Davey John Dead States Waste Baskets All of the given D
to leave after entry are called Lockers options
18 According to theory of automata 1 2 3 4 B
there are _________ types of
languages
Safi Khan | Virtual University of Pakistan
98 Computer Science MCQs for NTS / PPSC

19 A DFA with n states must accept at True False NA NA


least one string of length greater
than n
20 =,a,Aa,Abb-, then string 1 2 3 4 D
aAaAbbAa has ________ length
21 Languages generated by kleene Finite Infinite Sometimes None of the B
star are always __________ finite & these
sometimes
infinite
22 Let S = {aa, bb} be a set of strings abba aabbbaa bbaab A
then s* will have
23 If r1 = (aa + bb) and r2 = ( a + b) (r1)(r2) (r1 + r2) (r2)* (r1)* B
then the language (aa + bb)* will
be generated by
24 If a language can be expressed True False Depends on None of the A
through FA, then it can also be language above
expressed through TG
25 Above given FA accepts the Begins with and Begins with and Has length None of the A
language in which strings ends in same ends in different more than 2 given
letter letter
26 GTG can have _______________ 0 1 More than 1 All of the given D
final state
27 In GTG, if a state has more than - + * None of the B
one incoming transitions from a given
state. Then all those incoming
transitions can be reduced to one
transition using _____________
sign
28 One language can be expressed True False Depends on None of the A
by more than one NFA. This NFA given
statement is ___________
29 One FA has 3 states and 2 letters 4 5 6 7 C
in the alphabet. Then FA will have
___________ number of
transitions in the diagram
30 If an alphabet has n number of n+m (n)(m) m^n n^m D
letter, then number of strings of
length m will be
31 Every finite language can be True False Depends on None of these A
expressed by FA. This statement language
is __________
32 a*b* = (ab)* this expression is True False Cant be None of these B
_________ assumed
33 If a language is expressed through True False Depends on None of these A
TG, then that language will have language
its RE
34 In TG there may exist more than True False Depends on None of these A
one path for certain string the language
35 In TG there may exist no paths for True False Depends on None of these A
certain string the language
36 GTG can have _______________ 0 1 More than 1 All of the given D
final state

Safi Khan | Virtual University of Pakistan


99 Computer Science MCQs for NTS / PPSC

37 Every FA should be __________ Deterministic Non- Deterministic None of these A


Deterministic & Non-
Deterministic
38 S= {a,bc,cc} has the latters 1 2 3 4 C
39 S={a,bb,bab,baabb} set of strings baba baabbab bbaaabb bbbaabaabb A
then S* will not have
40 One language can represents True Falss Cant be Non of given A
more than one RE assumed
41 TG can more then one initial state True False Depend on None of given A
alphabets
42 The clouser FA*(star on an FA ) Null aa bb None of given A
always accept ______string
43 In FA final state represent by + - = * A
_________sign
44 In FA one enter in specific stat but Dead States Waste Baskets Davey John All of above D
there is no way to leave it then Lockers
state is called
45 Using tree structure final state * - double circle None of given C
represent by
46 Length of strings, generated by finite infinite Depends on none of these A
infinite language is_______ the language
47 RE for the language defined over a(a+b)* (a+b)*a (a+b)* None of these A
=,a,b- having words starting with
a is____________
48 Every Infinite language is regular True False NA NA A
this statement is
49 TG is always deterministic True False NA NA B
50 The length of output string in case Finite Automaton TG GTG None of these A
of _________ is one more than
the length of corresponding input
string
51 If in an NFA, ^ is allowed to be a Will not remain NFA with NFA with null Either "NFA C
label of an edge then that NFA is NFA string with null string"
called _________ OR "NFA with "
52 Length of null string is Always not equal Always equal to It has variable All are true B
to 0 0 length
53 In FA, if one enters in a specific Dead States Waste Baskets Davey John All of these D
state but there is no way to leave Lockers
it, then that specific state is called
54 In TG there may exist no paths for True False Depends on None of these A
certain string the language
55 In GTGs there may exist no path True False Depends on None of these A
for a certain string alphabet
56 In drawing FA3 (which is equal to States of both At least one Depends on None of the B
FA1 + FA2), a state will be declared FAs are final state is final language given
final if
57 In TG, there may be a transition True False Cant show None of these A
for null string transition for
string
58 The _______ machine helps in Incrementing Complementing Decrementing None of the A
building a machine that can given
perform the addition of binary

Safi Khan | Virtual University of Pakistan


100 Computer Science MCQs for NTS / PPSC

numbers
59 GTG can have _____________ Zero One More than One OR more D
initial state One than One
60 One FA has n states and m letters (n)+(m) (m)-(n) (m)(n) OR None of the C
in the alphabet. Then FA will have (n)(m) given options
_____ number of transitions in the
diagram
61 If L1 and L2 are expressed by Regular Ir-regular Cant be Another A
regular expressions r1 and r2, decided Language which
respectively then the language is not listed
expressed by r1 + r2 will be here
_________
62 Which statement is true? All words are All strings are Both are None of these A
strings words always same
63 One language can be represented True False Cant be None of these A
by more than one RE this assumed
statement is___________
64 (a + b)*b is RE for the language True False Such a None of these A
defined over S={a,b} having words language is
not ending in a not regular
65 According to 3rd part of the TG FA G and FA None of these C
Kleenes theorem, If a language
can be accepted by an RE then it
can be accepted by a _________
as well
66 If FA1 accepts no string and FA2 FA1 FA2 May be both None of the B
accepts many strings, then FA1 + given
FA2 will be equal to
67 If r1 and r2 are regular expressions r1 = r2 r1r2 r1* r1 r2 D
then which of the following is not
regular expression
68 Which of the following is not a aaabbb abbbabaa abababa bbbaaa C
word of language EQUAL?
69 If S = {aa, bb}, then S* will not aabbaa bbaabbbb aaabbb aabbbb C
contain
70 PALINDROME can be defined by True False By only one RE Some times By B
more than one regular language only one RE and
Some times
False
71 S = {baa, ab}, then S* will not abbaab abab baabaa abbaa A
contain
72 a(a+b)*a+b(a+b)*b is RE for the True False Such a None of these A
language defined over S={a,b} language is
having words beginning and not regular
ending with same letters
73 FA1 corresponds to r*, then FA1 Every Null Odd length Even length A
must accept __________ string
74 FA1 and FA2 are two FAs Accepted by FA1 Accepted by FA1 Accepted by None of the C
representing two languages. Then AND FA2 OR FA2 FA1 AND/OR given options
FA3, which is sum of FA1 and FA2, FA2
will accept the strings which are
75 a (a + b)* is the RE of language True False Such a None of the A
defined over S = {a, b} having at language does given options
Safi Khan | Virtual University of Pakistan
101 Computer Science MCQs for NTS / PPSC

least one a not exist


76 (a + b)* a is RE for the language True False Such a None of the A
defined over S={a,b} having words language is given options
not ending in b not regular
77 In which of the following language EQUAL INTEGER PALINDROME FACTORIAL C
Rev(s)=s
78 FA3 expresses r1r2. Then initial Initial state of FA2 Initial state of Initial states of Depends on B
state of FA3 will consist of FA1 both FA1 & FAs
FA2
79 FA3 expresses r1r2. Then there True False Depends on None of these B
will be at least one final state of language
FA3 that consist of final state of
FA1 and initial state of FA2
80 Two machines are said to be True False Depends on May be or may B
equivalent if they print the same language not be
output string when the different
input string is run on them
81 TG can have more than one initial True False Depends on None of these A
state alphabets
82 (a+b)*a(a+b)*b(a+b)* is the RE of True False Such a None of the A
language defined over S={a,b} language does given options
having at least one a and one b not exist
83 The production of the form True False NA NA A
nonterminal is said to be null
production
84 Consider the following GFC : True False NA NA B
saa|bB,aaa|B,BaS| here
saaand AB are null
productions ,while B is null
able production
85 Which statement is true? The tape of turing The tape of The tape of The tape of A
machine is infinite turing machine is turing turing machine
finite machine is is finite when
infinite when the language is
the language is nonregular
regular
86 The production of the form Null production Null able Unit None of the C
nonterminal one nonterminal is production production given
called the
87 For a given input, it provides the NAND box DELAY box OR box AND box A
compliment of Boolean AND
output
88 Choose the correct statement A Mealy machine A Moore A Mealy All of these C
generates no machine machine has
language as such generates no no terminal
language as such state
89 Let Q and R be expressed by ab*a Single letter Double letter String Null string B
and (ba)* respectively i.e Q={aa
,aba ,abba -and R=,,ba
baba,bababa.-..aba is the only
word in Q which can make a word
in R, because the words in R don,t
contain the
Safi Khan | Virtual University of Pakistan
102 Computer Science MCQs for NTS / PPSC

90 It delays the transmission of signal OR box DELAY box NAND box AND box B
along the wire by one step (clock
pulse)
91 To describe the complement of a String Regular Alphabet Word C
language, it is very important to Expression
describe the ----------- of that
language over which the language
is defined
92 Let L be a language defined over Non regular Complement of Non of the All of above B
an alphabet ,then the language language of L the language L given
of strings , defined over , not
belonging to L denoted by LC or L.
is called
93 For the given input, it provides the DELAY box AND box NAND box OR box D
Boolean OR output
94 For the given input, AND box True False NA NA A
provides the Boolean AND output
95 The current in the wire is indicated True False NA NA A
by 1 and 0 indicates the absence
of the current
96 If L is a regular language ,then TG GTG FA Non of the C
according to Kleene,theorem , given
there exists an
97 Any language that can not be True False NA NA B
expressed by a RE is said to be
regular language
98 and r2 = ( a + b) then the language (r1 + r2) (r2)(r1) (r1)* (r1)(r2) A
(aa + bb)(a + b) will be generated
by
99 If L1 and L2 are regular languages L1 + L2 L1L2 L1* All of above D
is/are also regular language(s)
100 Let L be a language defined over True False NA NA T
an alphabet , then the language
of strings, defined over , not
belonging to L, is called
Complement of the language L,
denoted by Lc or L
101 For a certain language L, the True False NA NA T
complement of Lc is the given
language L i.e. (L^c)^c = L
102 If L is a regular language then, Lc is Regular Non-regular Regular but None of the A
also a _____ language finite given
103 If an effectively solvable problem Decision problem Decision method Decision Decision C
has answered in yes or no, then procedure making
this solution is called ___________
104 There is an approach in defining PQ=R R=PQ QR=P Non of above A
the quotient of regular languages
ie the language Q is said to be
quotient of two regular languages
P and R, denoted by Q=R/P if
105 Consider a language L defined over Class ,state Final ,infinite Regular All of Above A
an alphabet if two strings x and y ,nonregular
defined over are run over an FA
Safi Khan | Virtual University of Pakistan
103 Computer Science MCQs for NTS / PPSC

accepting the language L,then x


and y are said to belong to the
same _________ if they end in the
same _________
106 If L is a regular language then, ------ Lm Ls Lx Lc D
--- is also a regular language
107 Converting each of the final states Complement of L Finite Automata Transition Regular A
of F to non-final states and old of L Graph of L expression of L
non-final states of F to final states,
FA thus obtained will reject every
string belonging to L and will
accept every string, defined over
, not belonging to L. is called
108 If L1 and L2 are two regular True False NA NA B
languages, then L1 U L2 is not a
regular
109 L= language of words containing (a+b)*aa(a+b)* (b+ab*a)* a+bb*aab*a (a+b)*ab(a+b)* B
even number of as. Regular
Expression is
110 The regular expression defining GTG, TG FA, GTG FA, TG TG, RE B
the language L1 U L2 can be
obtained, converting and reducing
the previous ---------- into a ----------
-- as after eliminating states
111 The language that can be True False NA NA B
expressed by any regular
expression is called a Non regular
language
112 Choose the incorrect statement (a+b)*aa(a+b)* A language Every None of these D
generates Regular consisting of all language that
language strings over can be
=,a,b- having expressed by
equal number of FA can also be
as and bs is a expressed by
regular language RE
113 The languages -------------- are the EVEN-EVEN and PALINDROME PALINDROME FACTORIAL and B
examples of non regular languages PRIME and PRIME and EVEN- SQURE
EVEN
114 Let L be any infinite regular Pumping Lemma Kleenes None of the 1,2 both A
language, defined over an theorem given
alphabet then there exist three
strings x, y and z belonging to *
such that all the strings of the
form xy z n for n=1,2,3, are the
words in L. called Complement of L
115 Languages are proved to be True False NA NA A
regular or non regular using
pumping lemma
116 ------------------- is obviously infinite EQUAL-EQUAL EVEN-EVEN PALINDROME FACTORIAL C
language
117 If L1 and L2 are expressed by Ir-regular Cant be decided Regular Another C
regular expressions r1 and r2, language Language which
respectively then the language is not listed
Safi Khan | Virtual University of Pakistan
104 Computer Science MCQs for NTS / PPSC

expressed by r1 + r2 will be here


_________
118 If, two strings x and y, defined True False NA NA A
over , are run over an FA
accepting the language L, then x
and y are said to belong to the
same class if they end in the same
state, no matter that state is final
or not
119 Myhill Nerode theorem is L partitions * If L is regular If L generates All of above D
consisting of the followings into distinct then, L finite number
classes generates finite of classes then
number of L is regular
classesIf L is
regular then, L
generates finite
number of
classes
120 The language Q is said to be R=Q/P Q=R/P Q=P/R P=R/Q B
quotient of two regular languages
P and R, denoted by--- if PQ=R
121 If two languages R and Q are True False NA NA A
given, then the prefixes of Q in R
denoted by Pref(Q in R)
122 Let Q = {aa, abaaabb, bbaaaaa, {b,bbba,bbbaaa} {b,bba,bbaaa} {ab,bba,bbbaa {b,bba,bbba} A
bbbbbbbbbb} and R = {b, bbbb, }
bbbaaa, bbbaaaaa} Pref (Q in R) is
equal to
123 If R is regular language and Q is Non-regular Equal Regular Infinite C
any language (regular/ non
regular), then Pref (Q in R) is
___________
124 The regular expression thus Regular No regular Empty Non of the C
obtained if contains at least one above
word then the language is not
empty otherwise the language
is__________
125 "CFG" stands for _________ Context Free Context Free Context Finite Context Finite B
Graph Grammar Graph Grammar
126 The langue generated by CFG is True False NA NA A
called Context free language (CFL)
127 ___________ states are called the ACCEPT and ACCEPT and ACCEPT AND ACCEPT AND A
halt states REJECT READ START WRITE
128 The part of an FA, where the input State Transition Input Tape Output Tape C
string is placed before it is run, is
called
129 TM is more powerful than FSM The tape It has no finite It has the None of these B
because movement is state control capability to
confined to one remember
direction arbitrary long
sequences of
input symbols
130 In new format of an FA This state ACCEPT REJECT STATR READ B
Safi Khan | Virtual University of Pakistan
105 Computer Science MCQs for NTS / PPSC

is like dead-end non final state


131 For language L defined over {a, b}, Infinite Finite Distinct Non-distinct C
then L partitions ,a, b-* into
classes
132 = language of words containing (a+b)*aa(a+b)* (b+ab*a)* a+bb*aab*a (a+b)*ab(a+b)* B
even number of as. Regular
Expression is
133 All NonNull words of the CFL can string regular language null string non of above C
be generated by the
corresponding CFG which is in CNF
i.e the grammar in CNF will
generate the same language
except the
134 The __________ is said to be CFL CFG GTG None of the B
ambiguous if there exist at least given
one word of its language that can
be generated by the different
production tree
135 Between the two consecutive One character can Any no. of One character Any no. of B
joints on a path be pushed and characters can can be pushed characters can
one character can be pushed and and any no. of be pushed and
be popped one character characters can any no. of
can be popped be popped characters can
be popped
137 In pumping lemma theorem (x y^n n=1, 2, 3, 4. n=0, 1, 2, 3, n=.-3,-2,-1, n=.-3,-2,-1, A
z) the range of n is 4. 0, 1, 2, 3, 4 1, 2, 3, 4
138 TM is more powerful than FSM The tape It has no finite It has the None of these B
because movement is state control capability to
confined to one remember
direction arbitrary long
sequences of
input symbols
139 If every production in CFG is one Regular Nonregular Finite Infinite A
of the following forms.
Conterminal semi word,
Nonterminalword Then the
language generated by that GFC is
140 Then the language generated by Non regular Infinite Regular Finite C
that CFG is
141 The PDA is called non- START or READ POP or REJECT READ or POP PUSH or POP C
deterministic PDA when there are
more than one out going edges
from state
142 Identify the TRUE statement A PDA is non- A PDA is never Like TG, A PDA A PDA is non- C
deterministic, if non- can also be deterministic, if
there are more deterministic non- there are more
than one READ deterministic than one
states in PDA REJECT states in
PDA
143 The language Q is infinite True False NA NA A
144 Left hand side of a production in One terminal More than one One non- Terminals and D
CFG consists of: terminal terminal non-terminals
145 It is very important to determine CFG CFL PDA TAPE C
Safi Khan | Virtual University of Pakistan
106 Computer Science MCQs for NTS / PPSC

which sequences of rows do


correspond to possible paths
through the
146 The following problem(s) ------------ The two regular The two FAs are Both a and b None of given C
- is/are called decidable expressions equivalent
problem(s) define the same
language
147 Before the CFG corresponding to Standard form Conversion form Left most None of them B
the given PDA is determined,the derivation
PDA is converted in to the
standard form which is called the
148 The deviation of the word W Left most Left most None of these A ,B both B
generated by a CFG, such that at terminal deviation
each step ,a production is applied
to the left most nonterminal in the
working string is said to be
149 To examine whether a certain FA Final to initial Final to final Initial to final Initial to initial C
accepts any words, it is required to
seek the paths from ___________
state
150 The high level language is True False NA NA A
converted into assembly language
codes by a program called
compiler
151 Grammatical rules which involve Semantics Syntactic Both a and b None of given A
the meaning of words are called
_____________
152 Choose the correct statement A Mealy machine A Moore A Mealy All of these C
generates no machine machine has
language as such generates no no terminal
language as such state
153 Grammatical rules which do not Semantics Syntactic Both a and b None of given B
involve the meaning of words are
called ___________
154 The word formal in formal They are Only the form of The symbols None of these C
languages means unnecessary, in the string of used have well
reality symbols is defined
significant meaning
155 ___________is a place where the Stack Pop and Stack Pushdown None of these C
input letters can be placed until Stack
these letters are referred again. It
can store as many letters as one
can in a long column
156 Consider the language L of strings, There are finite There are infinite There are There are B
defined over = ,a,b-, ending in a many classes many classes finite many infinite many
generated by L, so generated by L, classes classes
L is regular so L is regular generated by generated by L,
L, so L is non- so L is non-
regular regular
157 he symbols that cant be replaced Productions Terminals Non-terminals All of above B
by anything are
called______________
158 One language can be expressed True False Some times None of these A
Safi Khan | Virtual University of Pakistan
107 Computer Science MCQs for NTS / PPSC

by more than one FA. This true &


statement is ________ sometimes
false
159 The symbols that must be Productions Terminals Non-terminals None of given C
replaced by other things are called
__________
160 Which of the following statement FA can be FA can be NFA can be TG can be D
is NOT true considered to be considered to be considered to considered to
an NFA an NFA with null be an TG be an NFA
string
161 Let FA 3 be an FA accepting L1L2 FA3, FA2 FA1 , FA2 FA1,FA3 None of the B
then the initial stat of FA3 must be given
correspond to the initial state
of__________ and initial state
of___________
162 The grammatical rules are often Productions Terminals Non-terminals None of given A
called___________
163 Does the empty string match the True False Some times None of given B
regular expression |y+a|? true &
sometimes
false
164 The terminals are designated by Capital, bold Small, capital Capital, small Small, bold B
________ letters, while the non-
terminals are designated by
________ letters
165 FA corresponding to an NFA can no transition at one transition at more than one none of the C
be built by introducing a state certain state certain state transitions at given options
corresponding to the combination certain state
of states, for a letter having
Choices
166 = ,a,b- Productions SXaaX, (a+b)*aa(a+b)* (a+b)*a(a+b)*a (a+b)*aa(a+b) (a+b)*aba+b)* A
XAx, XbX, X. This grammar *aa
defines the language expressed
by___________
167 Which statement is true The tape of turing The tape of The tape of The tape of A
machine is infinite turing machine is turing turing machine
finite machine is is finite when
infinite when the language is
the language is nonregular
regular
168 The language generated by FA TG CFG TGT C
__________ is called Context Free
Language (CFL).
169 Let A = {0, 1}. The number of n! n^2 n^m 2^n B
possible strings of length n that
can be formed by the elements of
the set A is
170 S aXb|bXa X aX|bX| The Beginning and Beginning and Having even- None of given A
given CFG generates the language ending in ending in same even language
of strings in English __________ different letters letter
171 Every regular expression can be True False Depends on None of the A
expressed as CFG but every CFG the language given options
cannot be expressed as a regular
Safi Khan | Virtual University of Pakistan
108 Computer Science MCQs for NTS / PPSC

expression. This statement is:


172 The CFG is said to be ambiguous if True False Depends on None of the A
there exists atleast one word of its the language given options
language that can be generated by
the different production trees,
173 The language generated by that No terminal No terminal Both a and b None of given C
CFG is regular if _________ semi word word
174 A regular language Must be finite Must be infinite Can be finite Must be finite A
or infinite and cannot be
infinite
175 The production of the form non True False Depends on None of given A
terminal is said to be null the language
production
176 Who did not invent the Turing Alan Turing A. M. Turing Turing None of these B
machine?
177 A production is called null able True False NA NA A
production if it is of the form N

178 A DFA with n states must accept at True False NA NA A
least one string of length greater
than n
179 For every three regular True False NA NA A
expressions R, S, and T, the
languages denoted by R(S U T) and
(RS) U (RT) are the same
180 Like TG, a PDA can also be non- True False NA NA B
deterministic
181 In FA, if one enters in a specific Dead State Waste Basket Davey John All of these A
state but there is no way to leave Locker
it, then that specific state is called
___________
182 In CFG, the symbols that cant be Terminal Non-Terminal Production All of given C
replaced by anything are
called__________
183 Which of the following is NOT a String of 0s Set of all String of 0s All of the given B
regular language? whose length is a palindromes whose length options
perfect squere made up of 0s is a prime
and 1s number
184 Choose the incorrect (FALSE) A Mealy machine A Mealy For a given All of these C
statement generates no machine has no input string,
language as such terminal state length of the
output string
generated by a
Moore
machine is not
more than the
length of the
output string
generated by
that of a
Mealy
machine
185 Pumping lemma is generally used A given language A given language Whether two None of these B
Safi Khan | Virtual University of Pakistan
109 Computer Science MCQs for NTS / PPSC

to prove that is infinite is not regular given regular


expressions of
a regular
language are
equivalent or
not
186 Which of the following is a regular String of odd Set of all String of 0s All of these C
language? number of zeroes palindromes whose length
made up of 0s is a prime
and 1s number
187 language can be expressed by True False Some times None of these A
more than one FA. This true &
statement is ______ sometimes
false
188 language Must be finite Must be infinite Can be finite Must be finite B
or infinite and cannot be
infinite
189 Enters in a specific state but there Dead State Waste Basket Davey John All of these D
is no way to leave it, then that Locker
specific state is called
190 symbols that cant be replaced by Terminal Non-Terminal Production All of given A
anything are called________
191 Following is NOT a regular String of 0s Set of all String of 0s All of the given D
language? whose length is a palindromes whose length options
perfect squere made up of 0s is a prime
and 1s number
192 Left hand side of a production in One terminal More than one One non- Terminals and D
CFG consists of terminal terminal non-terminals
193 One language can be expressed by True False Some times None of these A
more than one FA. This true &
statement is ______ sometimes
false
194 'Formal in formal languages The symbols used They are Only the form None of these A
means have well defined unnecessary, in of the string of
meaning reality symbols is
significant
195 TM is more powerful than FSM The tape It has no finite It has the None of these B
because movement is state control capability to
confined to one remember
direction arbitrary long
sequences of
input symbols
196 A program which is the set of rules TAPE HALT TM None of above A
which show that which state is to
be entered when a letter is read
form the
197 The process of finding the PLUS TIMING Parsing HALT All of above B
derivation of word generated by
particular grammar is called
198 For a non regular language there True False NA NA B
exist ___________ FA
199 Bottem up parsing can be Regular Non regular Obtain Finite C
determined similar to that of TOP
Safi Khan | Virtual University of Pakistan
110 Computer Science MCQs for NTS / PPSC

Down parsing with the change


that in this case ,the process is
started with the given string and
the tree is extended till S is
200 A production in CFG consists of One terminal More than one One non- Terminals and D
terminal terminal non-terminals
201 If L1 and L2 are regular languages L1 + L2 L1L2 L1* All of above D
is/are also regular language(s)
202 Between the two consecutive One character can Any no. of One character Any no. of B
joints on a path be pushed and characters can can be pushed characters can
one character can be pushed and and any no. of be pushed and
be popped one character characters can any no. of
can be popped be popped characters can
be popped
203 Language which are context free True False NA NA B
are called Non CFL
204 The two regular expressions same language The two FAs are Both a and b None of given C
define the equivalent
205 If F accept an .. language Regular Finite Infinite None of given C
then there are some words w.s.t
N length (w) <2n
206 If an FA has N state then it must N2 N-1 N+1 all of above C
accept the word of length
207 The values of input (say a & b) tape halt clock pulse start C
does not remain same in one cycle
due to
208 Consider the following CFG: One production Two producton Total language All of above A
saS|bS|aaS| can be observed tree tree tree
that the word aaa can be derived
from more than
209 One language can have _________ At least one At least two At least three None of them A
CFG(s)
210 The reverse of the string sbfsbb (bsbfsb) bfsbs sbbfsb bbfsb A
over { sb, f, b}
211 CFG is said to be a regular Three forms One form Four forms Two forms D
grammar if it generates the
regular language i.e.a CFG is said
to be a regular grammar in which
each production is one of the:
212 If L1 and L2 are regular languages (L1/L2 is always L1+L2 are always L1*l2 are None of them A
then which statement is NOT true? regular) regular always regular
213 If the intersection of two regular True False NA NA A
languages is regular then the
complement of the intersection of
these two languages is also
regular:
214 the moment a final state of first ,third first ,second second ,third all of above B
_________ FA is entered ,the
possibility of the initial state of
__________ FA will be included as
well
215 Any word generated by given CFG True False NA NA B
cannot also be expressed by
Safi Khan | Virtual University of Pakistan
111 Computer Science MCQs for NTS / PPSC

Syntax tree or Generation tree or


Derivation tree as well
216 According to Mayhill Nerode Regular Nonregular Infinite Infinite A
theorem, if L generates finite no.
of classes then L is ____________
217 L is a regular language so by FA GTG TG CNF A
kleene,s theorem ,there exists an
___________
218 The language generated by the Produced Null string Pumping Non of then A
CFG is called the language lemma
_________ by the CFG
219 In CFG, the symbols that cannot be None terminals Infinite Finite Terminals D
replaced by anything are called
___________
220 The production S --> SS | a | b | ^ (a+b)+ a-b (a-b)+ None of them A
can be expressed by RE
221 Set of all palindromes over {a,b}is True False NA NA B
regular
222 An FA has same initial and final True False NA NA B
state, then it means that it has no
final state
223 The same non terminals can be Productions Regular None regular None of them A
written in single line if they have production production
more than one __________
224 If L1 and L2 are two regular Regular None regular Finite None infinite A
languages then L1L2 is also
225 NO154: For language L defined Distinct Accept Unit None of the A
over {a, b},then L partitions {a, b}* production above
into classes
226 The two FAs are Same Equivalent Different None of them B
227 There is at least one production Terminal Infinite None Terminal All of above C
that has one ________ on its left
side
228 The complement of a regular True False NA NA A
language is also a regular
229 If an effectively solvable problem Decision Decidable Solved able All of above A
has answer in yes or no ,then this procedure problem problem
solution is called
230 In pref(Q in R) Q is _________ to Q is not equal to Q is equal to R Q is infinite None of them A
(than) R R
231 For FA corresponding To TG GFC FA GTG C
(L1L2c)U (L1cL2) the regular
expression ca be determined that
defines the language accepted by
this
232 a^n b^n generates the Non regular Regular language Infinite Finite language A
__________ language languages language
233 (a+b)*a(a+b)*b(a+b)* is the RE of True False Such a None of these A
language defined over ={a,b} language does
having at least one a and one b not exist
234 NO164: If r1 = (aa + bb) and r2 = ( (r2)(r1) (r1 + r2)* (r2)*(r1)* (r1)* D
a + b) then the language (a + b)*

Safi Khan | Virtual University of Pakistan


112 Computer Science MCQs for NTS / PPSC

(aa + bb)* will be generated by


235 In FA starting state is represented + - * S A
by a ________ sign
236 If w is large enough word in a CF CNF L CFL CFG B
then w can be decomposed into w
=uvwxyz such that all words of the
form uvn xynz belong to
237 Can a turing machine's head ever True False True but only True but only in B
be in the same location in two in finite infinite
successive steps? languages langauges
238 Examin the following CFG and abb is a word in abb is not the any word can Non of these A
select the correct choice: the corresponding word of be accept
S AB, A BSB, B CC C SS A CFL corresponding from the
a|b C b|bb CFL corresponding
CFL
239 The production of the form live production dead production type of none of them A
nonterminal string of two production
nonterminals is called a
240 Converting the given CFG in CNF is CYK algorithm CKY algorithm KYC algorithm CNK algorithm A
the first rule of _____
241 Which statement is true? The PDA must The PDA must The PDA must There is no D
have one accept have one accept have two reject state in
state and one state and two accept state the PDA
reject state reject state and two reject
state
242 If a language can be expressed by True False Depends on None of the B
a regular expression, then its language given optios
complement cannot be expressed
by a regular expression. This
statement is
243 Left hand side of CFG may consist One terminal More than one One non- Terminals and C
of terminal terminal non-terminals
244 The production S --> SS | a | b | ^ (a+b)+ (a+b) (a+b)* (ab)* C
can be expressed by RE
245 The locations into which we put words alphabets cells elements C
the input letters on "Input Tap"
are called
246 In a CFG the nonterminal that Least Significant Most Significant Left most Left most C
occurs first from the left in the nonterminal nonterminal nonterminal derivate
working string, is
247 The unit production is Terminal --> Terminal --> Non Non terminal - Non terminal -- B
Terminal Terminal -> Terminal > Non Terminal
248 A _____ operator adds a new PUSH POP READ APPEND A
letter at the top of STACK
249 PDA stands for ________ Push and Drop Pop and Drop Push Down None of given C
Automaton Automaton Automaton options
250 A _________ is the one for which deterministic PDA nondeterministic PUSHDOWN Input Tape D
every input string has a unique PDA store
path through the machine
251 In the null production N --> ^ , N is Terminal Non terminal Word None of the B
a given options
252 The major problem in the earliest To store the To display To load the To calculate the B

Safi Khan | Virtual University of Pakistan


113 Computer Science MCQs for NTS / PPSC

computers was contents in the mathematical contents from mathematical


registers formulae the registers formula
253 In polish notation, (o-o-o) is the Operand - Operand - Operator - Operand - C
abbreviation Of__________? Operator Operand- Operand Operand
Operand Operator Operand Operand
254 The input string is placed, before it Stack Memory Tape Ram C
runs, in
255 Which of the following states is START ACCEPT WRTITE REJECT C
not part of PDA
256 The production of the form: NULL UNIT Chomsky form None of the A
Nonterminal-> ^ is said to be production given options
______ production
257 The CFG is said to be ambiguous if One Two More than one At most one C
there exist at least one word of its
language that can be generated by
the ___________
258 Considering FA1 and FA2 having 2 2 3 more than 3 none of them D
states each. Now FA1+FA2 can
have maximum ______________
number of states
259 Closure of an FA, is same as Union Sum Concatenation Intersection C
___________ of an FA with itself,
except that the initial state of the
required FA is a final state as well
260 If R is a regular language and L is True False NA NA A
some language, and L U R is a
regular language, then L must be a
regular language

Safi Khan | Virtual University of Pakistan


114 Computer Science MCQs for NTS / PPSC

CS403-Database Management
ID Qus A B C D Ans
1 Making a change to the Physical data Concurrency Logical data Functional C
conceptual schema of a independence control independence dependency
database but not affecting
the existing external
schemas is an example of
2 Which key word is available Check Primary Key Set Default Unique B
in SQL to enforce referential
integrity?
3 Which of the following INSERT UPDATE GRANT TRUNCATE D
statements are Data
Definition Language
commands?
4 How many clustered 2 3 5 1 D
index(es) do each database
table have?
5 Which of the following is is DDL Resets identity of cannot activate a Can be Rolled back A
true about DELETE Command the table trigger
command?
6 Which of the following will all rows in a indexes table structure and constraints A
be deleted relating to a table its columns
table if you use TRUNCATE
command?
7 Which of the following is It is the process De-normalization is In de-normalization It enhances the B
not true about De- of attempting a technique to it is required to add performance of DB
normalization? to optimize the move from lower redundant data.
performance of to higher normal
a database forms of database
modeling
8 Which of the following is Users should be Each transaction, Must preserve the Dependant on D
not a feature of able to regard run by itself consistency of the other concurrent
TRANSACTION? the execution database transactions
of each
transaction as
atomic
9 Which of the following gives select * from select emp* from select emp_id select * where A
all the fields from employee EMP; EMP' where EMP; EMP;
table named as EMP?
10 Suppose there are 4 fields SELECT * FROM SELECT * FROM SELECT * FROM SELECT * FROM A
in a table named CUST CUST WHERE CUST WHERE CUSTOMER WHERE CUSTOMER
(customer_id, first_name, last_name='ALI' last_name=ALI; name=ALI; WHERE
last_name, phone). Which ; last_name=ALI;
of the following gives all the
information of the
customers in the table
whose last name is ALI?
11 Identify the correct Normalization Normalization can The process of The process of D
statement with respect to is a formal be used as a top- normalization normalization
normalization. technique that down standalone through through
can be used database design decomposition must decomposition
only at the technique. achieve the lossless must achieve the

Safi Khan | Virtual University of Pakistan


115 Computer Science MCQs for NTS / PPSC

starting phase join property at any dependency


of the database cost whereas the reservation
design. dependency property at any
reservation cost whereas the
property is lossless join
sometimes property is
sacrificed. sometimes
sacrificed.
12 Which of the following is A denormalized Denormalization It is an attempt to Denormalization C
not true with respect to data model is takes place before optimize the process can not be
denormalization? not the same as the normalization performance of initiated before the
a data model process database Database design
that has not
been
normalized
13 Which of the following is New records Record in main file The overflow is Multiple indexes D
incorrect with respect to are added to an that precedes it is merged with the for the same key
indexed sequential files? overflow file updated to contain main file during a field cannot be
a pointer to the batch update setup
new record
14 Which of the following vertical List Hash Range C
types of partitioning
reduces the chances of
unbalanced partitions?
15 DML commands are used inserting data Creating databases Destroying Creating DB A
for: into databases databases objects
16 Which of the following is Single DFD is Created at The dataflow must Used to represent A
correct regarding Dataflow required to increasing levels of be bidirectional the relationships
diagram? represent a detail among the
system external entities
17 What is the impact of Multiple It will increase It increases It decreases C
setting multiple indexes for indexes for the complexity as the efficiency efficiency
the same key, in index same key can access time will be
sequential files? not be set increased
18 Which of the following is Index can be It can be created It support Range It can not be D
not true regarding Indexes? defined even using Create selections created on
when there is Index statement composite
no data in the attributes
table
19 While recovering data, A system file Log file Data dictionary Metadata B
which of the following files
does a recovery manager
examines at first?
20 The main memory of a ROM RAM PROM Hard disk B
computer system is also
known as
21 _______is a control that Combo box Button Text box Static area B
enables users to select one
option from an associated
list; users can also type an
option.
22 _______ records data by Hard disk RAM Optical disk Floppy disk C
burning microscopic holes

Safi Khan | Virtual University of Pakistan


116 Computer Science MCQs for NTS / PPSC

in the surface of the disk


with a laser.
23 Which of following is NOT Reduce Balance Workload Merging different Speed up rate of C
generally the aim of data Workload relations useful works
partitioning and placement
of data?
24 Which feature of database User accessible Data processing Authorization Recovery service D
provides conversion from catalog service
inconsistent state of DB to a
consistent state ensuring
minimum data loss?
25 Which of the following View is always a View can not be The results of using Rows can not be D
statements is true about complete set of used for retrieving a view are not updated or deleted
the views? all the tables in data permanently stored in the view
a database in the database
26 Which of the following is Can be Rolled Activates Triggers is DML Command Resets identity of D
true about TRUNCATE? back the table
27 Which of the following is the number of the number of the number of rows the number of D
the correct way to find out columns in the columns in the first in the first table rows in the first
the size of cartesian first table table multiplied by multiplied by the table multiplied by
product incase of CROSS multiplied by the number of number of columns the number of
JOIN? the number of rows in the second in the first table rows in the second
columns in the table table
second table
28 Suppose there are 8 rows 32 12 16 24 D
and 4 columns in TABLE1
and 3 rows and 4 coulmns
in TABLE2; what is the size
of the cartesian product
incase of CROSS JOIN
between these two tables?
29 Which of the following is atomicity consistency redundancy durability C
not one of the properties of
Transaction?
30 Which of the following is It is not A database view Views can be used Views are generally A
INCORRECT about VIEWS? possible to left displays one or as security used to focus the
out the data more database mechanisms perception each
which is not records on the user has of the
required for a same page database
specific view
31 Which of the following is ALTER HAVING SELECT THEN A
used to add or drop
columns in an existing
table?
32 Which of the following is Records are Dense and Track overflows and Cylinder index C
NOT a feature of Indexed stored in nondense types of file overflow areas increases the
sequential files? sequence and indexes are can not be ensured efficiency
index is maintained
maintained
33 Which of the following Constraints Relations Check points Transactions C
serves as a milestone or identities
reference point in the log
file?

Safi Khan | Virtual University of Pakistan


117 Computer Science MCQs for NTS / PPSC

34 Which of the following is A set of A database A database A database B


not true regarding DB database transaction is a transaction must be transaction must
transactions? operations that logical unit of atomic contains the ACID
are processed database property
partly operations
35 Which of the following are Data input Editing Display All of given D
the general activities, which programs
are performed during the
development of application
programs?
36 Browser based forms are HTML Scripting language Front Page Web-based Forms D
developed in the following
tools EXCEPT
37 Which of the following is CD ROM WORM Erasable Optical EEPROM D
not a form of optical disk?
38 Which of the following is When data is The number of When data is When data is lost A
the correct description of found in the times the cache is removed in the from the cache
cache hit? cache accessed directly cache
by the processor
39 In which of the following Frequently Relatively static Relatively deletion Relatively dynamic B
situations, Clustering is updating
suitable:
40 Only one type of constraint True False A
can be enforced in any table
by CREATE command
41 An entity type is defined when a specific type such a coherent set of defined by the B
the database is as an integer, text, similar objects that database designer
actually date, logical etc we want to store
constructed data on (e.g.
STUDENT, COURSE,
CAR)
42 An entity can be logically hyperlink common attribute primary key superkey B
connected to another by
defining a ____.
43 You cant modify more than True False A
one table at a time through
a view
44 Which of the following is Creating Destroying Inserting data in Non of the above C
one of the purposes of databases databases tables
using DML commands?
45 Suppose there are 4 rows 24 20 18 15 A
and 3 columns in TABLE1
and 6 rows and 5 coulmns
in TABLE2; what is the size
of the cartesian product
incase of CROSS JOIN
between these two tables?
46 Which of the following is creating and manipulating updating records inserting records C
one of the purposes of destroying databases into databases into databases
using DDL commands? databases
47 Which of the following CREATE CREATE DB ADD DATABASE CREATE company A
statements creates a DATABASE company company DATABASE
database named company
Safi Khan | Virtual University of Pakistan
118 Computer Science MCQs for NTS / PPSC

COMPANY.
48 Which of the following is Provide an Especially useful Provide different One input forms D
not true about input forms? easy, effective, when the person controls to add data can populate one
efficient way to entering the data is into the table table at a time
enter data into not familiar with
a table the inner workings
49 Which of the following is an RAM ROM Flash memory CPU A
example of volatile
memory?
50 ALTER TABLE exams True False B
RENAME COLUMN
Q_description TO
Question_Descp, Std_ID to
Student_ID. Syntax of
ALTER TABLE is NOT correct.
51 Which of the following is Collisions dont Unlimited number Fast access through Overhead of C
Advantage of Re-Hashing use primary of elements use of main table multiple linked lists
technique to handle the table space space
collisions?
52 Materialized views and They must be They can be They consume All of the Given C
Indexes are NOT similar by refreshed when accessed directly storage space
the following way(s). the data in their using a SELECT
master tables statement
changes
53 Select 'NORTH', CUSTOMER Has an error - Has an error - Has an error - the Does not have an A
From CUST_DTLS Where the string ORDER BY clause string in single error
REGION = 'N' Order By should be in quotes 'NORTH' and
CUSTOMER Union Select double quotes 'SOUTH'
'EAST', CUSTOMER From
CUST_DTLS Where REGION
= 'E' Order By CUSTOMER
54 A software package Database DBMS Data model Data B
designed to store and
manage databases
55 Who is responsible for Database Database End Users Application B
authorizing access to the Designers Administrators Programmers
database, for coordinating
and monitoring its use ?
56 A superkey that does not candidate key primary key superkey secondary key A
contain a subset of
attributes that is itself a
superkey is called a ____.
57 A ____ entity has a primary strong weak business relationship B
key that is partially or
totally derived from the
parent entity in the
relationship
58 Small organizations usually True False B
have complex management
structure
59 Which of the following is ONTO INTO UPTO WITH B
used with INSERT command
to insert values in a DB
Safi Khan | Virtual University of Pakistan
119 Computer Science MCQs for NTS / PPSC

table?
60 Which of the following is a SELECT FROM * SELECT * FROM SELECT * WHERE SELECT WHERE * B
correct way of selecting all Persons Persons Persons Persons
the columns from a table
called PERSONS?
61 The ________ operator IN FROM LIKE None of the above C
allows to use wild cards in
the where clause of an SQL
statement
The ________ operator
allows to use wild cards in
the where clause of an SQL
statement
62 Which of the following CREATE CREATE DB IMDB; ADD DATABASE CREATE IMDB A
statements creates a DATABASE named IMDB; DATABASE;
database named IMDB IMDB;
63 Which of the following is It increases the Clustering makes suitable to relatively It is a process, B
not true regarding efficiency since records, difficult to static situations which means to
clustering? related records access place records from
are placed close different tables to
to each other place in adjacent
physical locations
64 In One to Many many instances One instance of Primary key of 2 none of above A
cardinality one instance of a of second entity second entity type relations
relation is mapped with type
65 A second Normal Form (2 be in 1 NF not have a not have attributes not have attributes A
NF) relation should composite key dependent on key dependent on one
attribute another
66 Normalization of database (i) avoid (i) avoid accidental (i) avoid accidental (ii) eliminate A
is essential to accidental deletion of deletion of required inconsistencies
deletion of required data data when some when a data item
required data when some data is data is deleted (iv) is modified in the
when some deleted (iii) allows use a database database (iv) use a
data is deleted storage of data in a management database
ii) eliminate computers disk system management
inconsistencies system
when a data
item is
modified in the
database
67 An attribute y may be i and ii i and iii ii and iii iii A
functionally dependent on
(i) a composite attribute x,y
(ii) a single attribute x (iii)
no attribute
68 in One to One True False A
Relationship One instance
of first entity type is
mapped with two instances
of second entity type
69 Which of the following is SELECT FROM WHERE UPDATE C
used to filter rows
according to some

Safi Khan | Virtual University of Pakistan


120 Computer Science MCQs for NTS / PPSC

condition(s)?
70 Which of the following is AVG SUM UPPER MAX C
not an aggregate function
71 CREATE TABLE and CREATE DML DDL DCL DQL B
index belongs to which type
of SQL commands
72 In SQL, which command is UPDATE INSERT BROWSE APPEND A
used to modify the rows of
tables
73 SQL is used for: Creating, Generating Maintaining data All of the above D
managing and queries, integrity and
deleting tables organizing, coordinate data
and manage managing and sharing
the retrieving data
relationships stored in a
among the database
stored date
74 Which language is used to DCL DDL DML All of the above A
permit or prohibit access to
a table?
75 Which of the following is a COUNT LEN SQRT SIN B
String function in SQL
76 Truncate is an alternative of True False A
Delete command
77 Which of the following SQL GRANT REVOKE Both GRANT and SELECT C
statements used to control REVOKE
access to the data and to
the database?
78 Data Manipulation True False A
Language (DML) is the set
of commands used to
maintain and query a
database including
updating, inserting,
modifying and retrieving
data
79 Which of the following is Create DB Create table Delete Drop C
NOT a DDL command?
80 Which of the following SUM MIN MAX All of the above D
function falls in the
category of Aggregate
functions
81 SQL stands for Only I Only II Only lll Both I and II A
______________. I
Structured Query Language
II Standard Query
Language lll- Status Query
Language
82 Making a change to the Physical data Concurrency Logical data Functional C
conceptual schema of a independence control independence dependency
database but not affecting
the existing
external schemas is an
Safi Khan | Virtual University of Pakistan
121 Computer Science MCQs for NTS / PPSC

example of
83 SQL data types do not have True False A
support for storing multi-
media objects directly
84 What happens if the All records from No record from the First record of the The statement will A
WHERE clause is omitted the table are table will be table will be deleted not be executed
from a DELETE statement? deleted deleted and will give a
syntax error
85 Query Analyzer is used to True False A
practice SQL in MS-Access
and MS-SQL Server.
86 Which of the following is DML DDL DCL Both DML and DDL A
used to retrieve and insert
information from database?
87 Which of the following can Data types Constraints Attributes Cardinalities D
not be included into
CREATE TABLE statement?
89 A relational database is one that a database that is one that consists of the same as a flat C
consists of two able to process two or more tables file database
or more tables tables, queries, that are joined in
forms, reports and some way
macros
90 Which model operates at conceptual internal external physical D
the lowest level of
abstraction?
91 A________is used to mail server file server client-server none of the given B
maintain a connection
between the users of the
database system
92 A collection of concepts Database DBMS Data model Data C
that can be used to describe
the structure of a database
93 Data about data is True False A
metadata
94 A primary key is an True False Partially True None of the given A
attribute (or set of
attributes) that has been
chosen for an entity, whose
values are used to uniquely
identify a particular
instance of an entity
95 Which of the following is During By referring to a Transformation of During the logical D
INCORRECT statement requirements high level data the high level data design phase of
concerning the database collection and model, it is model into the internal storage
design process? analysis phase, possible to implementation structures, access
one can gather understand the data model is called paths and file
the data data requirements logical design or organization for
requirements of the users, entity data model the database files
of database types, relationships mapping are specified
users and constraints
96 Which of the following Development, Creation of the Monitoring and All of the above C
describes the job of a implementation system catalog controlling database
database administrator? operation of security and
Safi Khan | Virtual University of Pakistan
122 Computer Science MCQs for NTS / PPSC

the physical authorization:


database Setting up controls
to ensure the
quality and integrity
of data
97 Which of the following is Dataflow Datastore External entities Relationship D
NOT a component of a between external
DFD? entities
98 The Entity Relation Model Entities, Entities and Relationships Entities C
models Relationships Relationships
and Processes
99 A relational database A network of Nested tables Tables, rows and A tree-like A
system is based on the data records columns structure of data
concept(s) of:
101 DML does not used to Add new rows Retrieve row from Modify the rows of Alter a table D
to tables tables tables definition
102 What does the abbreviation Database Data Borrowing Digital Base Database D
DBMS stand for? Manipulation and Movement Mapping System Management
Software Software System
103 Identify the language which DCL DML DDL Non of the above D
is used to specify database
schema
104 Columns used to uniquely True False B
identify individual rows of a
given table, may be
specified to be not NOT
NULL
105 Value of a function in SQL is True False A
always determined by the
input parameters
106 Which of the following is Cannot be used Can be used to Can not be used to Can be used to add A
incorrect about alter table to modify type delete a column create a new table column in the
statement? or size of an existing table
existing column
107 GRANT is a DCL DML DDL None of the above A
______________ Command
108 __________ User Interface Easy to Hard to Easy to understand, Hard to A
is preferred over ________ understand, understand, effective understand,
User Interface with respect efficient efficient effective
to user
109 REVOKE is a Data Definition Control Access Data manipulation Data description B
______________ statement
110 Identify the basic part(s) of SELECT FROM Both SELECT and DISTINCT C
a SELECT statement? FROM
111 Objective of an order by True False A
clause is to display or
arrange output of a select
statement in a particular
order
112 Which of the following is INTO VALUE INSERT Modify D
not a part of an INSERT
statement?
113 UPDATE command belongs DML DDL DCL DQL A
Safi Khan | Virtual University of Pakistan
123 Computer Science MCQs for NTS / PPSC

to which type of
Classification
114 GRANT belongs to which DML DDL DCL DQL C
type of SQL commands
classification
115 Which of the following is ALTER TABLE ALTER TABLE Both I and II None of the above C
the correct syntax for table_name { table_name { ADD
adding a new column into ALTER [COLUMN] column
an existing table [COLUMN] type [(size)]
column type [DEFAULT default]
[(size)] }
[DEFAULT
default] }
116 The _________ function IN Like AND Between A
helps reduce the need to
use mutiple OR conditions
118 In SQL, which command is Delete Remove Truncate Both I and II A
used to delete rows from
table
119 Which of the fllowing Where Order by From Having B
clauses allows to sort the
records in result set?
121 In SQL queries, while Bull Not Null Data Type None of the above B
creating tables or relations
in database, key columns
may be specified by
123 Grant belong to which types DML DDL DCL DQL C
of SQL command
classification
124 Update command belong to DML DDL DCL DQL A
which type of classification
125 Which of the following is It increases the Clustering makes Suitable to relatively It is a process, B
not true regarding efficiency since records, difficult to static situations which means to
clustering ? related records access place record from
are placed close different tables to
to each other places in adjacent
physical locations.
126 Truncate command Poor Same Better Worst C
responses time is
____________ as compared
to delete command
127 Which of the following is a Count LEN SQRT SIN B
String function in SQL
128 Consider a table named The statement The statement The statement None of the above A
emp having fields displays the displays the entire displays the entire
Empname, EmpID, Age, entire fields fields from emp in fields from emp in
salary. Which of the from emp in which the which the Empname
following is true if the which the Empname is ALI in is ALI in ascending
following SQL statement Empname is ALI descending order order of their age
tries to execute? SELECT * in any order of their age
FROM emp WHERE
Empname=ALI ORDERBY
Age; The statement has a
Safi Khan | Virtual University of Pakistan
124 Computer Science MCQs for NTS / PPSC

syntax error
131 Which of the following is ALTER TABLE ALTER TABLE Both I and II None of the above B
the correct syntax for table_name { table_name { ADD
adding a new column into ALTER [COLUMN] column
an existing table [COLUMN] type [(size)]
column type [DEFAULT default]
[(size)] }
[DEFAULT
default] }
132 REATE TABLE and CREATE DML DDL DCL DQL C
index belongs to which type
of SQL commands
133 Which of the following is a It ensures and It maintains an It manages the All of the above D
service provided by a enforces data environment in metadata in the are services of a
DBMS? integrity at all which security is data dictionary DBMS
levels created and
enforced
134 What is the difference A RDBMS uses A DBMS is used for Because a relational Because a C
between a DBMS and an metadata while data warehousing database is more conventional
RDBMS? a DBMS does complicated than a database is less
not conventional complicated than a
database, the relational
RDBMS requires database, the
much more DBMS is used more
computing power often for
than the transactional
conventional DBMS databases
requires
135 Which of the following A data storage Frequent and The most common Generally used in A
statements best describes a facility complex type of database in environments with
data warehouse? dedicated to transactions use today large inventories,
using the characterize its use thus the term
existing data to warehouse
generate
information
136 Which of the following Inclusion of Derived attributes Query speed is Poor design is the C
justifies the inclusion of derived should be used enhanced by not only excuse for the
derived attributes in a attributes is a when they add to computing derived inclusion of
database? standard design elegance attributes derived attributes
procedure and
does not
require
justification
137 Select the statement that An attribute or An attribute or An attribute or An attribute or D
best defines a candidate combination of combination of combination of combination of
key attributes that attributes that is attributes that attributes that
allows the user calculated from establishes could be, but is
to search for existing data relationships not, used as a PK
non-unique between tables
data
138 A __________ is established primary key data anomaly dependency transitive C
when the value of one relationship
attribute is dependent on

Safi Khan | Virtual University of Pakistan


125 Computer Science MCQs for NTS / PPSC

the value of another


attribute
139 The room ID + building ID ROOM_ID, ROOM_ID + ROOM_ID, ROOM_ID, A
determines the room BUILD_ID ? BUILD_ID ? ROOM_SCH ? BUILD_ID ?
schedule. This is written ROOM_SCH ROOM_SCH BUILD_ID ROOM_SCH
140 The database data storage Foreign key and Transitive Replicated data and Transitive A
standard requires that, with replicated data dependencies and primary keys dependencies and
some exceptions, data must requirements foreign keys primary keys
occur in only one place at
one time. What are the
exceptions?
141 Data redundancies produce transitive dependencies normalization data anomalies D
unusual and undesirable requirements
data management
problems caused by
__________
142 Removing the __________ feiorgn keys primary key recursive partial and D
is part of the database dependencies relationships transitive
design process dependencies
143 In a POS system, what do Inventory Sales, inventory Sales, invoice Inventory B
the major transaction management, management, calculations, back management,
modules define? shipping, shipping, back ordering, and shipping, invoice
invoice ordering, and product returns calculations, back
calculations, product returns ordering, and
and product product returns
returns
144 After creating the initial define the perform the create a basic data define the entities, C
ERD segments, the next major appropriate dictionary for all the attributes,
step is to transaction normalization components found relationships,
modules checks based on in each ERD connectivities,
the data dictionary segment cardinalities, and
contents constraints.
146 Which of the following is an It clarifies the It highlights the It forces careful It makes the C
advantage of having a assignment of best possible way assessment of the creation of the
precisely written set of data types to perform each procedures data dictionary
current operations task much easier
147 You have created a table in The save fails The save works as Access warns you Access warns you D
Access, but not yet because no PK usual that no primary key that no primary
designated a PK. What is defined is defined, and key is defined, but
happens if you save the forces you to define lets you save the
table now? a PK before saving table if you want
to
148 You want to create a Hold down the Hold down the Ctrl Hold down the Shift Hold down the Ctrl B
composite PK using the first Shift key and key and click the key and click the key and click the
and third fields in the table. click the first first and third first and third fields. first and third
How is this done? and third fields. fields. Click the Key Select Primary Key fields. Select
Click the Key icon on the toolbar under the Table Primary Key under
icon on the the Table
toolbar.
149 What is required to :1 relationships Make sure that the Make sure that the Nothing special is C
establish a 1:1 relationship are only PK in the related FK in the related required
between two tables that do possible if the table has unique table has an index
not contain a supertype and tables contain a values property that

Safi Khan | Virtual University of Pakistan


126 Computer Science MCQs for NTS / PPSC

subtype? supertype and specifies unique


subtype values
150 In Access, how do you tell if The The relationship Right-click the Right-click the A
referential integrity is relationship lines are thin, and relationship line to relationship line,
enforced for a relationship? lines are thick the nature of the see if enforce select referential
and dark, and relationships is referential integrity integrity, and look
the nature of labeled is checked at the
the relationship's
relationships is properties
labeled
151 The relationship between Delete the Permanently Open the Delete all C
STORE and EMPLOYEE is employees remove the EMPLOYEE table in relationships
defaulted to mandatory, from the STORE referential the design format; between STORE
that is, the FK value in to be deleted integrity then change the and EMPLOYEE.
EMPLOYEE is required. How enforcement Required property Redesign the
do you eliminate a record of the EMPLOYEE's database to work
from STORE? FK to No and make without them
sure that its default
value is set to null
152 What does Access use to SQL for Query Code Query by Example SQL compiler C
handle SQL code Generator
generation?
153 Two basic query types exist. static and static and action select and action select and change C
They are change queries queries queries queries
154 What criteria matches dates >= >= 01/01/1996 >= #01/01/1996# >= '01/01/1996' C
from January 1, 1996 to the "01/01/1996"
present?
155 EMP_DOB holds employee Month: Month: Month: Month: B
birth dates. Which format Format([EMP_D Format([EMP_DOB Format([EMP_DOB], Format([EMP_DOB
will display the month in OB],"m") ],"mm") "mmm") ],"mmmm")
number format, such as 01
or 11?
156 What does the wildcard ? Zero or more of Any one character Multiple characters Any letter in the B
Match? the preceding in the position held in the position held position held by
character by the ? by the ? the ?
157 Which of the following are Forms are used Forms extend data Forms are used to Forms program D
not functions of forms? to tie together validation rules enter new data and and control user
the database through queries, to edit existing data responses
components value lists, and
through menu other input control
structures devices
158 Which of the following A form is based A form is based on A form may be A form may be C
correctly describes the on exactly one exactly one table. based on one or based on one or
relationship between forms table. The table The table may be more tables. The more tables. The
and tables? must exist created before or table(s) must exist table(s) may be
before the form after the form is before the form is created before or
is created created created after the form is
created
159 What is the most common A single-source A single-source A multi-source A multi-source A
form type? form, based on form, based on a form, based on a form, based on a
a tabular columnar format tabular format columnar format
format
160 What are the advantages of They have more They allow the use Access-generated All of the above D

Safi Khan | Virtual University of Pakistan


127 Computer Science MCQs for NTS / PPSC

form-based dialog boxes? prompting of combo boxes dialog boxes are


options than likely to disrupt
dialog boxes interface layout
generated by schemes, while
Access form-based dialog
boxes are not
161 Which of the following is Help make the Provide security Control access by Create an B
not an advantage of a menu database though user-level providing only those environment that
driven database system? applications logins options that allow is tailored to
system user- people to do their specific types of
friendly by jobs applications and
eliminating the end users
need to
remember
command
languages
162 You want month names to Sort by month Sort by month Define the field with Define the field B
be sorted in order (Jan, Feb, name number the data type with the data type
Mar, etc.) when they month and sort month and sort
appear on a report. What Ascending Descending
do you need to do?
163 What functions would you Time() and Time() and CurrentTime() and CurrentTime() and A
use to put the current time Now() CurrentDate() Now() CurrentDate ()
and data output in a report
header?
164 Which syntax will ([EMP_FNAME] ([EMP_FNAME] & " ([EMP_FNAME] " " ([EMP_FNAME] " " B
concatenate employee first & " " " & [EMP_FNAME]) & [EMP_FNAME]) [EMP_FNAME])
and last names, with a [EMP_FNAME])
space in between the
names?
165 Which of the following Crosstab Crosstab queries If you select row You can select row C
accurately describes a queries have are seldom used to totals in the totals and also
crosstab query? very limited generate reports crosstab query, you column totals
summary cannot also select
capabilities column totals
166 What kind of query works Append Update Action Select D
best with the Chart Wizard?
167 Which of the following best An SQL script An instruction or a A VBA program A detailed set of B
describes a macro? set of instructions actions that Access
that triggers one or will invoke
more actions whenever a mouse
click occurs
168 Macros are best placed in macro sets macro groups code sets modules B
logical modules known as
169 Which of the following They are best They are best used They are best used Do not use D
statements best describes used for for menu items to enter temporary freestanding
the use of freestanding conditional values in a form macros
macros? statements
170 What action hides or shows Reveal Echo Hide Show B
the results of a macro while
it runs
171 What macro will be Autoexec AutoStart Startup AutoRun A
executed automatically

Safi Khan | Virtual University of Pakistan


128 Computer Science MCQs for NTS / PPSC

when you open the


database?
172 What standard must a basic TCP/IP ASCII XML SQL B
HTML-based web page
conform to?
173 Which cannot be dragged to Tables Controls Macros Queries C
a Data Access Page using
the Controls Wizard?
174 When inserting a field in the TotalOf SumOf MaximumOf MinimumOf B
footer, what is the default
prefix is
175 A record set is exactly the a query a data access page a table a macro C
same as
176 What's the maximum 1 2 3 4 D
number of different fields
that can you sort in the
Page Wizard?
177 In a database security object permission operation group A
environment, a form, table,
query, report, macro, or
module in the database is
a(n)
178 What file does Access use The LDB file The PID file The MDE file The MDB file A
to lock a database in a
shared environment?
179 Which of the following You can only You can create You can create You can create B
accurately describes create one many workgroup many workgroup many workgroup
workgroup files? workgroup file files, but you can files, and you can files, but are
per computer use only one use more than one limited to using
workgroup file at a workgroup file at a two at a time
time time
180 What does Access use to Jet Database PID files MDW files Access Lockout A
manage database locking in Engine Protocol (ALP)
a multiuser database
environment?
181 What permission allows the Open Open/Run Administer Run B
user to open a database,
form or report, or run a
macro?
183 Query Analyzer is used to True False A
practice SQL in MS-Access
and MS-SQL Server
184 Data about data is database True False F
185 A relational database A network of Nested tables Tables, rows and A tree-like A
system is based on the data records columns structure of data
concept(s) of
186 Within a table, each is a minimal is always the first must be numeric must be unique D
primary key value __ superkey field in each table
187 Which levels are mostly Level-0, Level-1 Level-1, Level-2 Level-2, Level-3 Level-3, Level-4 A
used for Detailed DFD?
188 Who is responsible for Database Database End User Application B
authorizing access to the Designer Administrator Programmer
database, for coordinating
Safi Khan | Virtual University of Pakistan
129 Computer Science MCQs for NTS / PPSC

and monitoring its use?


189 Incase of Context-level One process Two processes One process only Any number of C
Diagram, the system is atleast atleast processes
represented by
190 User rights information is Physical Catalog Logical database Buffer A
stored in database
192 An instance is a particular a special type of an attribute of an any particular A
occurance of an relation entity entity
entity
194 A table can be logically hyperlink common attribute primary key superkey B
connected to another table
by defining a ___________
195 Which one of the following Data about Describes a data Self-describing Includes user data D
is NOT a characteristic of data dictionary
meta data?
196 A Foreign Key is A field in a A field in a table A field in a table A field in a table A
table that that contains data that has the same that has the same
matches a key that is also name as a key field name as a key field
field in another contained in another table in another table
table elsewhere in
another table
197 Which model operates at conceptual internal external physical D
the lowest level of
abstraction?
198 The main software package Data Dictionary Report Generator Database Distributed C
that supports a database Management database
management approach is System
called
199 The ER model is meant to replace be close to a users enable low level enable detailed D
relational perception of the descriptions of data descriptions of
design data data query
processing
200 Controlling redundancy in a avoid avoid unnecessary avoid unauthorised avoid inconsistency C
database management duplication wastage of storage access to data among data
system DOES NOT help to space
201 A description on a particular Database Relation Schema None C
collection of data using the
given data model
202 Which of the following Planning, Establishing Communicating Allocation of A
functions are NOT designing and standards and with database users storage locations
performed by a database implementing procedures for and data
administrator? database database systems structures
systems
203 A candidate key that does superkey candidate key primary key secondary key C
not have a null value and is
selected to uniquely
identify all other attribute
values in any given row is
called a __
204 Identify the factor which Every non-key Every non-key The domain of Every non-key D
enforces a relation in 3NF? attribute is fully attribute is attribute must attribute is non-
functionally partially include only atomic transitively
dependent on dependent on values dependent on
Safi Khan | Virtual University of Pakistan
130 Computer Science MCQs for NTS / PPSC

primary key super key primary key


205 Consider two sets A and B. 6 9 5 4 A
A contains 2 elements and B
contains 3. How many
elements do their cartesian
product
206 Identify the operation Join Union Cartesian Product Set Difference A
which is NOT one of the
parts of the five basic set
operations in relational
algebra?
207 Consider the following Only A Only B Only B and C Only A and B A
statements. A. An entity
integrity constraint states
that no primary key value
can be null B. A referential
integrity constraint is
specified between two
relations C. A foreign key
cannot be used to refer to
its own relation.
208 Given are the relations of Instructor Student Instructor Student Student B
student and Instructor, Student Instructor Instructor
Which relational algebra
operation could have been
applied on the pair of
relations Student and
Instructor to obtain the
above data?
209 Which one is the corrected using junction By splitting data As a single table By creating three A
way to implement M to M table with keys into tables with PK rarly as to tables tables and linking
relation which designing and FK with PK and FK them through PK
data base and FK
210 Which of the following is one process all sources/sinks data flows linking sub-processes D
NOT a feature of Context (which (external entities) the process to the (which explain and
DFD? represents the sources and sinks decomposed the
entire system) (external entities) major process into
small processes)
211 A relation (from the all tuples in a relational model for any two tuples, all tuples in a A
relational database model) relation must supports multi- the values particular relation
consists of a set of tuples, be distinct valued attributes associated with all may have different
which implies that whose values can of their attributes attributes
be represented in may be the same
sets
212 Identify the constraint that NOT NULL CHECK FOREIGN KEY UNIQUE A
limits the values that can be
placed in a column
213 Identify the correct Normalization Normalization can The process of The process of B
statement with respect to is a formal be used as a top- normalization normalization
normalization technique that down standalone through through
can be used database design decomposition must decomposition
only at the technique achieve the lossless must achieve the
starting phase join property at any dependency

Safi Khan | Virtual University of Pakistan


131 Computer Science MCQs for NTS / PPSC

of the database cost whereas the reservation


design dependency property at any
reservation cost whereas the
property is lossless join
sometimes property is
sacrificed sometimes
sacrificed
214 Identify the INCORRECT An entity may One cannot Age can be An entity type B
statement among the given be an object consider considered as a describes the
with a physical something which single value schema or
existence like a has conceptual attribute of a intension for a set
car, a house or existence like a person of entities which
an Employee course in a degree share the same
program as an structure
entity
215 Structural constraints of a identifying the whether the the role that a the constraints B
relationship type refer to owner entity existence of an participating entity applicable in
type relevant to entity depends on from the entity type granting access to
a given entity it being related to plays in each tables, columns
type another entity via relationship and views in a
the relationship instance database schema
type
216 The ____ constraint specialization uniqueness inheritance completeness D
specifies whether each
entity supertype occurrence
must also be a member of
at least one subtype
217 Database management hardware software computer input and output B
systems, operating systems, infrastructure
applications and utilities are
all examples of
___________
218 Which of the following Full functional Any kind of Transitive Non-transitive A
concepts is applicable with dependency dependency dependency dependency
respect to 2NF?
219 In a three-level DBMS external conceptual internal physical A
architecture, the ______
level interacts directly with
the users
220 Which of the following A collection of A shared collection A collection of All of the above C
describes a database stored of logically related stored data
system? operational data (and a organised in such a
data used by description of this way that all user
the application data) designed to requirements are
system of some meet the satisfied by the
particular information needs database. In general
enterprise of an organisation there is only one
copy of each item of
data although there
may be controlled
repetition of some
data
221 Which of the following INSERT UPDATE GRANT TRUNCATE D

Safi Khan | Virtual University of Pakistan


132 Computer Science MCQs for NTS / PPSC

statements are Data


Definition Language
command?
222 Which of the following CREATE CREATE DB ADD DATABASE CREATE company A
statements creates a DATABASE company copmany DATABASE
database named COMPANY company
223 ALTER TABLE exams True False B
RENAME COLUMN
Q_description TO
Question_Descp, Std_ID to
Student_ID. Syntax of
ALTER TABLE is NOT correct.
224 Materialized views and They consume They must be They can be All of the Given C
Indexes are NOT similar by storage space refreshed when accessed directly
the following way(s) the data in their using a SELECT
master tables statement
changes
225 Select 'NORTH', CUSTOMER Has an error - Has an error - Does not have an Has an error - the A
From CUST_DTLS Where the string ORDER BY clause error string in single
REGION = 'N' Order By should be in quotes 'NORTH'
CUSTOMER Union Select double quotes and 'SOUTH'
'EAST', CUSTOMER From
CUST_DTLS Where REGION
= 'E' Order By CUSTOMER
226 A ____ relationship exists Unary Binary Ternary Weak A
when an association is
maintained within a single
entity
227 Data Redundancy Means Security of data Duplication of data Management of Recovery of data B
data
228 Which of the following PRIMARY KEY FOREIGN KEY CHECK NOT NULL A
constraints enforces entity
integrity?
229 Which of the following person's name class location bank account book title B
might be represented with balance
a multivalued attribute?
230 Which of the following is a limit the values used to enforce enforces the is a unique D
feature of CHECK that can be referential uniqueness of the identifier for a row
constraint? placed in a integrity values in a set of within a database
column columns table
231 Each table must have a primary secondary logical foreign A
____ key
232 A collection of concepts Database DBMS Data model Data B
that can be used to describe
the structure of a database
233 Which of the following person's phone car's color employee's computer's D
might be represented with number educational processor speed
a single-valued attribute? background
234 In an ERD, the focus is on attributes entities keys indexes B
the ____ and the
relationships between them
236 The ________ operator IN FROM LIKE None of the above C
allows to use wild cards in
Safi Khan | Virtual University of Pakistan
133 Computer Science MCQs for NTS / PPSC

the where clause of an SQL


statement
237 Which of the following is ALTER TABLE ALTER TABLE Both I and II None of the above B
the correct syntax for table_name { table_name { ADD
adding a new column into ALTER [COLUMN] column
an existing table? [COLUMN] type [(size)]
column type [DEFAULT default]
[(size)] }
[DEFAULT
default] }
238 What are the fourth and Define the Develop business Develop business Define the major A
fifth steps in developing a entities, rules. Create the rules. Define the transaction
POS? attributes, initial ERD entities, attributes, modules. Create
relationships, segments relationships, the initial ERD
connectivities, connectivities, segments
cardinalities, cardinalities, and
and constraints. constraints
Create the
initial ERD
segments
239 What will the following Available Data environment Current operations Business objectives C
questions help you define? resources
What types of transactions
take place? How many
different types of
transactions are there?
240 GRANT SELECT, Grant Grant permission Grant permission to Grant permission C
UPDATE(Designation) ON permission to to Hiruni in order Amali & Hiruni to to Amali and Hiruni
Employee TO Amali,Hiruni Amali,only to to grant, select and update designation to update all data
WITH GRANT retrieve data update permission of employees in the except designation
OPTION; What does this from Employee to Amali Employee table in Employee table
SQL statement do? table and grant
permission to
Hiruni, only to
update the
designation
from Employee
table

Safi Khan | Virtual University of Pakistan


134 Computer Science MCQs for NTS / PPSC

CS502-Fundamentals of Algorithms
ID Qus A B C D Ans
1 How many elements do we n / 2 elements (n / 2) + n n / 4 elements n elements D
eliminate in each time for the elements
Analysis of Selection algorithm?
2 The analysis of Selection arithmetic geometric linear orthogonal C
algorithm shows the total
running time is indeed
________in n
3 The reason for introducing Sieve divide-and- decrease and greedy nature 2-dimension A
Technique algorithm is that it conquer conquer Maxima
illustrates a very important
special case of
4 The sieve technique works in phases numbers integers routines A
___________ as follows
5 For the heap sort, access to arithmetic binary algebraic logarithmic A
nodes involves simple ________
operations
6 We do sorting to _________ keep elements in keep the algorithm keep the keep elements in D
random positions run in linear order algorithm run in increasing or
(log n) order decreasing order
7 For the heap sort we store the level-order in-order traversal pre-order post-order A
tree nodes in traversal traversal traversal
8 In the analysis of Selection T(n) T(n / 2) log n n/2+n/4 C
algorithm, we make a number
of passes, in fact it could be as
many as
9 In which order we can sort? increasing order decreasing order increasing order both at the same C
only only or decreasing time
order
10 One of the clever aspects of pointers constants variables functions A
heaps is that they can be stored
in arrays without using any
_________
11 Slow sorting algorithms run in O(n^2) O(n) O( log n) O(n log n) A
12 - What is the total time to O(log n) O(n log n) O(n^2 log n) O(log^2n) A
heapify?
13 After partitioning array in Quick Values smaller Values larger than Pivot is the first Pivot is the last A
sort, pivot is placed in a position than pivot are on pivot are on left element of array element of array
such that left and larger and smaller than
than pivot are on pivot are on right
right
14 The running time of quick sort No of inputs Arrangement of Size o elements Pivot element D
depends heavily on the elements in array
selection of
15 In Quick Sort Constants hidden Large Medium Small Not Known C
in T(n log n) are
16 It is possible to sort without True False NA AN A
making comparisons
17 Merge sort is stable sort, but True False NA NA A
not an in-place algorithm
18 In counting sort, once we know Delete Copy Mark arrange B
Safi Khan | Virtual University of Pakistan
135 Computer Science MCQs for NTS / PPSC

the ranks, we simply _________


numbers to their final positions
in an output array
19 An in place sorting algorithm is Two dimensional More than one No Additional None of the C
one that uses ___ arrays for arrays array Array above
storage
20 Continuation/counting sort is K is Large K is not known K may be small K is small D
suitable to sort the elements in or large
range 1 to k
21 In stable sorting algorithm If duplicate One array is used More than one Duplicating A
elements remain arrays are elements not
in the same required handled
relative position
after sorting
22 One example of in place but not Merger Sort Quick Sort Continuation Bubble Sort B
stable algorithm is Sort
23 Quick sort is _________ Stable & in place Not stable but in Stable but not in Some time stable C
place place & some times in
place
24 Which may be a stable sort? Merger Insertion Both above None of the C
above
25 Quick sort is based on divide There is explicit No work is needed Merging the None of above A
and conquer paradigm; we combine process to combine the subarrays
divide the problem on base of as well to conquer sub-arrays, the
pivot element and the solutin array is already
sorted
26 It requires more complicated True False NA NA A
data structures, Prim's
algorithm for a minimum
spanning tree is better than
Kruskal's when the graph has a
large number of vertices
27 Which of the following sorting Only I Only ii Both i and ii Both iii and iv A
algorithms is stable? (i) Merge
sort (ii) Quick sort (iii) Heap sort
(iv) Counting Sort
28 Mergesort is a stable algorithm True False NA NA A
but not an in-place algorithm
29 Memorization is? To store previous To avoid this To make the None of the B
results for future unnecessary process accurate above
use repetitions by
writing down the
results of recursive
calls and looking
them up again if
we need them
later
30 Dynamic programming True False NA NA A
algorithms need to store the
results of intermediate sub-
problems
31 Dynamic programming uses a True False NA NA B
top-down approach
Safi Khan | Virtual University of Pakistan
136 Computer Science MCQs for NTS / PPSC

32 The edit distance between At most four At least four Exact four Wrong A
FOOD and MONEY is
33 If there are O (n^2) entries in O (1) O (n^2) O (n) O (n log n) B
edit distance matrix then the
total running time is _________
34 A p x q matrix A can be O (q) O (1) O (n^2) O (n^3) A
multiplied with a q x r matrix B.
The result will be a p x r matrix
C. There are (p . R) total entries
in C and each takes _________
to compute
35 For Chain Matrix Multiplication We do not know We use divide and We can easily Size of data is A
we can not use divide and the optimum k conquer for perform it in not given
conquer approach because sorting only linear time
36 The Knapsack problem belongs Optimization NP Complete Linear Solution Sorting A
to the domain of ________
problems
37 Suppose we have three items as Items 1 and 2 Items 1 and 3 Items 2 and 3 None of these D
shown in the following table,
and suppose the capacity of the
knapsack is 50 i.e. W = 50. Item
Value Weight 1 60 10 2 100 20 3
120 30 The optimal solution is
to pick
38 Huffman algorithm uses a True False NA NA A
greedy approach to generate a
postfix code T that minimizes
the expected length B (T) of the
encoded string
39 The codeword assigned to True False NA NA A
characters by the Huffman
algorithm have the property
that no codeword is the postfix
of any other
40 The greedy part of the Huffman True False NA NA A
encoding algorithm is to first
find two nodes with larger
frequency
41 An optimization problem is one Not a solution An algorithm Good solution The best solution D
in which you want to find
42 What type of instructions Geometric and Algebraic and logic Arithmetic and Parallel and C
Random access machine can arithmetic logic recursive
execute?
43 Due to left complete nature of Arrays Structures Link List Stack A
binary tree, the heap can be
stored in
44 What type of instructions Algebraic and Geometric and Arithmetic and Parallel and C
Random Access Machine (RAM) logic arithmetic logic recursive
can execute?
45 Heaps can be stored in arrays left-complete right-complete tree nodes tree leaves A
without using any pointers; this
is due to the ________ nature of
the binary tree
Safi Khan | Virtual University of Pakistan
137 Computer Science MCQs for NTS / PPSC

46 knapsack problem is called a 0- Each item must One item must be Zero item must None of these A
1 problem, because be entirely entirely accepted be entirely
accepted or or rejected accepted or
rejected rejected
47 Sieve Technique can be applied True False NA NA A
to selection problem?
48 A heap is a left-complete binary increasing order decreasing order heap order (log n) order C
tree that conforms to the only only
_________
49 The recurrence relation of 10 16 31 32 D
Tower of Hanoi is given below
T(n)={1 if n=1 and 2T(n-1) if n >1
In order to move a tower of 5
rings from one peg to another,
how many ring moves are
required?
50 Divide-and-conquer as breaking smaller sub pivot Sieve Selection A
the problem into a small problems
number of
51 Sorting is one of the few lower upper average log n A
problems where provable
________ bonds exits on how
fast we can sort
52 Analysis of Selection algorithm T(n) T(1 / 1 + n) T(n / 2) T((n / 2) + n) D
ends up with
53 What is the time complexity to log (V) V.V E.E log A
extract a vertex from the
priority queue in Prims
algorithm?
54 The relationship between Both are equal Back edges are Back edges are There is no D
number of back edges and half of cycles one quarter of relationship
number of cycles in DFS is cycles between no. of
edges and cycles
55 You have an adjacency list for G, (V+E) (V E) (V) (V^2) A
what is the time complexity to
compute Graph transpose G^T ?
56 Kruskal's algorithm (choose best True False NA NA A
non-cycle edge) is better than
Prim's (choose best tree edge)
when the graph has relatively
few edges
57 Which is true statement in the Kruskal algorithm Kruskals algorithm Both of above Kruskal's D
following is multiple source is used to find algorithm
technique for minimum spanning (choose best
finding MST tree of a graph, non-cycle edge)
time complexity of is better than
this algorithm is Prim's (choose
O(EV) best Tree edge)
when the graph
has relatively
few edges
58 In the analysis of Selection linear arithmetic geometric exponent D
algorithm, we eliminate a
Safi Khan | Virtual University of Pakistan
138 Computer Science MCQs for NTS / PPSC

constant fraction of the array


with each phase; we get the
convergent _________ series in
the analysis
59 The sieve technique is a special 1 5 Few Many A
case, where the number of sub
problems is just
60 Random access machine or RAM Mathematical Machine build by Mechanical Electronics A
is a/an model Al-Khwarizmi machine machine
61 A RAM is an idealized machine 256MB 512MB an infinitely 100GB C
with _________ random-access large
memory
62 What is the total time to (log n) (n log n) (n2 log n) (log2 n) A
heapify?
63 When we call heapify then at It will take O(1) Time will vary It can not be It will take O(log A
each level the comparison according to the predicted n)
performed takes time nature of input
data
64 In Quick sort, we dont have the True False Less information Either true or A
control over the sizes of to decide false
recursive calls
65 Is it possible to sort without True False NA NA A
making comparisons?
66 If there are O(n2) entries in edit O(1) O(n^2) O(n) O(n log n) B
distance matrix then the total
running time is
67 Divide-and-Conquer is as Smaller Sub Pivot Sieve Solutions A
breaking the problem into a Problems
small number of
68 Analysis of Selection Sort ends T(n) T(1/1+n) T(n/2) T((n/2) +n) A
up with
69 The number of nodes in a 2^(h+1) 1 2 * (h+1) 1 2 * (h+1) ((h+1) ^ 2) 1 A
complete binary tree of height h
is
70 If a problem is in NP, it must True False NA NA A
also be in P
71 What is generally true of Lists require less Lists require less Lists require Lists require B
Adjacency List and Adjacency space than space than more space than more space than
Matrix representations of matrices but take matrices and they matrices and matrices but are
graphs? longer to find the are faster to find they take longer faster to find the
weight of an edge the weight of an to find the weight of an
(v1,v2) edge (v1,v2) weight of an edge (v1,v2)
edge (v1,v2)
72 If a graph has v vertices and e v edges v e + 5 edges v + e edges None of these D
edges then to obtain a spanning
tree we have to delete
73 Maximum number of vertices in True False NA NA A
a Directed Graph may be |V2|
74 The Huffman algorithm finds a Optimal Non-optimal Exponential Polynomial A
(n) _____________ solution
75 The Huffman algorithm finds an True False NA NA A
exponential solution

Safi Khan | Virtual University of Pakistan


139 Computer Science MCQs for NTS / PPSC

76 The Huffman algorithm finds a True False NA NA B


polynomial solution
77 Shortest path problems can be True False NA NA A
solved efficiently by modeling
the road map as a graph
78 Dijkestras single source True False NA NA B
shortest path algorithm works if
all edges weights are non-
negative and there are negative
cost cycles
79 Bellman-Ford allows negative True False NA NA B
weights edges and negative cost
cycles
80 The term coloring came form True False NA NA A
the original application which
was in architectural design
81 In the clique cover problem, for True False NA NA A
two vertices to be in the same
group, they must be adjacent to
each other
82 Dijkstras algorithm is operates True False NA NA A
by maintaining a subset of
vertices
83 The difference between Prims True False NA NA A
algorithm and Dijkstras
algorithm is that Dijkstras
algorithm uses a different key
84 A p q matrix A can be O (q) (p= 84) O (1) O (n^2) O (n^3) A
multiplied with a q r matrix B.
The result will be a p r matrix
C. There are (p . R) total entries
in C and each takes _________
to compute
85 Merge sort requires extra array True False NA NA A
storage
86 Non-optimal or greedy O(k) O(kN) O(2k) O(N) A
algorithm for money change
takes____________
87 The Huffman codes provide a True False NA NA B
method of encoding data
inefficiently when coded using
ASCII standard
88 Using ASCII standard the string 80 100 160 320 A
abacdaacac will be encoded
with __________ bits
89 Using ASCII standard the string True False NA NA B
abacdaacac will be encoded
with 160 bits
90 Using ASCII standard the string True False NA NA B
abacdaacac will be encoded
with 100 bits
91 Using ASCII standard the string True False NA NA B
abacdaacac will be encoded
Safi Khan | Virtual University of Pakistan
140 Computer Science MCQs for NTS / PPSC

with 32 bytes
92 The greedy part of the Huffman True False NA NA B
encoding algorithm is to first
find two nodes with character
frequency
93 Huffman algorithm uses a True False NA NA A
greedy approach to generate an
antefix code T that minimizes
the expected length B (T) of the
encoded string
94 Depth first search is shortest True False NA NA B
path algorithm that works on
un-weighted graphs
95 Dijkestra s single source True False NA NA A
shortest path algorithm works if
all edges weights are
nonnegative and there are no
negative cost cycles
96 Dijkestra s single source True False NA NA A
shortest path algorithm works if
all edges weights are negative
and there are no negative cost
cycles
97 Floyd-Warshall algorithm is a True False NA NA A
dynamic programming
algorithm; the genius of the
algorithm is in the clever
recursive formulation of the
shortest path problem
98 The term coloring came form True False NA NA A
the original application which
was in map drawing
99 In the clique cover problem, for Apart from Far from Near to Adjacent to D
two vertices to be in the same
group, they must
be_______________each other
100 In the clique cover problem, for True False NA NA B
two vertices to be in the same
group, they must be apart from
each other
101 The difference between Prim s True False NA NA B
algorithm and Dijkstra s
algorithm is that Dijkstra s
algorithm uses a same key
102 Although it requires more True False NA NA A
complicated data structures,
Prim's algorithm for a minimum
spanning tree is better than
Kruskal's when the graph has a
large number of vertices
103 Which sorting algorithm is faster O (n log n) O n^2 O (n+k) O n^3 C
104 Continuing sort has time O(n) O(n+k) O(nlogn) O(k) A
complexity of ?
Safi Khan | Virtual University of Pakistan
141 Computer Science MCQs for NTS / PPSC

105 Using ASCII standard the strings 64 96 128 256 B


|abababababab| will be
encoded with
106 Back edge is _________ (u, v) where v is (u, v) where u is an (u, v) where v is None of the A
an ancestor of u ancestor of v in predecessor of u given
in the tree the tree in the tree
107 Forward Edge is _________ (u, v) where u is a (u, v) where v is a (u, v) where v is None of the B
proper proper descendant a proper given
descendent of v in of u in the tree ancestor of u in
the tree the tree
108 Cross Edge is _________ (u, v) where u is (u, v) where v is a (u, v) where u (u, v)where u C
ancestor of v and proper descendant and v are not and v are either
v is not of u in the tree ancestor or ancerstor or
descendent of u descendent of descendent of
one another each other
109 What algorithm technique is Greedy Technique Divide and Dynamic The algorithm A
used in the implementation of Conquer Programming combines more
kruskal solution for the MST? Technique Technique than one of the
above
techniques
110 If you find yourself in maze the BFS BFS and DFS both Level order DFS D
better traversel approach will are valid
be
111 Dijkestras single source True False NA NA B
shortest path algorithm works if
all edges weights are
nonnegative and there are
negative cost cycles
112 Dynamic programming True False NA NA A
algorithms need to store the
results of intermediate
subproblems
113 Which sorting algorithn is faster O(n^2) O(nlogn) O(n+k) O(n^3) B
114 Counting sort has time O(n) O(n+k) O(k) O(nlogn) A
complexity
115 Which may be stable sort Bubble sort Insertion sort Both of above None of these C
116 Quick sort is Stable and In Not stable but in Stable and not in Some time in B
place place place place and snd
some time stable
117 Continuation sort is suitable to K is Large K is not known K may be small K is small D
sort the elements in range 1 to k or large
118 Node of a B- Tree is stored in O (n^2) O (n) O (n log n) O (log n) D
memory block and Traversing a
B-tree involves ____ page
faults?
119 The growth of master files and 1960 1970 1980 1990 A
magnetic tapes exploded
around the mid
120 Is an application of information Intelligence Education Knowledge Power C
& data
121 Need to synchronize data upon Data Limitation Data Manipulation Data Coherence Data Replication C
updation is called?
122 Suppose the amount of data Linear Quadratic Exponential Logarithmic C
Safi Khan | Virtual University of Pakistan
142 Computer Science MCQs for NTS / PPSC

recorded in an organization is
doubled every year, this is
called?
123 Relational databases allow you Forward One Backward Any D
to navigate the data in _____
direction that is appropriate
using the primary, foreign key
structure?
124 The input to the data True False NA NA A
warehouse can come from OLTP
or transactional systems or
other third party databases
125 Using ASCII standard the string True False NA NA B
abacdaacac will be encoded
with 320 bits
126 The greedy part of the Huffman True False NA NA A
encoding algorithm is to first
find two nodes with smallest
frequency
127 The difference between Prims True False NA NA A
algorithm and Dijkstra s
algorithm is that Dijkstra s
algorithm uses a different key
128 Naturally Evolving Architecture Good Relaxed Not Relaxed None B
occurred when an organization
had a ______ approach to
handling the whole process of
hardware and software
architecture?
129 ________ modeling technique is Dimensional Physical Entity None A
more appropriate for data Relationship
warehousing
130 ______ gives total view of an OLTP OLAP Data Database C
organization? warehousing
131 What general property of the There is Null The Isolated vertex Only one value is There is at least B
list indicates that the graph has pointer at the end is not handled in entered in the one null list
an isolated vertex? of list list list
132 Although it requires more True False NA NA A
complicated data structures,
Prim's algorithm for a minimum
spanning tree is better than
Kruskal's when the graph has a
large number of vertices
133 Shortest path problems can be True False NA NA A
solved efficiently by modeling
the road map as a graph
134 After partitioning array in Quick Values smaller Values larger than Pivot is the first Pivot is the last A
sort, pivot is placed in a position than pivot are on pivot are on left element of array element of array
such that left and larger and smaller than
than pivot are on pivot are on right
right
135 Merge sort is stable sort, but True False NA NA A
not an in-place algorithm
Safi Khan | Virtual University of Pakistan
143 Computer Science MCQs for NTS / PPSC

136 Which statement is true? If a dynamic- If a greedy choice both of above none of above B
programming property satisfies
problem satisfies the optimal-
the optimal- substructure
substructure property, then a
property, then a locally optimal
locally optimal solution is globally
solution is optimal
globally optimal
137 Which is true statement Breadth first Depth first search Both of above None of above C
search is shortest is shortest path are true are true
path algorithm algorithm that
that works on un- works on un-
weighted graphs weighted graphs
138 A dense undirected graph is A graph in which A graph in which E A graph in which All items above A
E = O(V^2) = O(V) E = O(log V) may be used to
characterize a
dense
undirected graph
139 Suppose that a graph G = (V,E) is O(|V |^2) O(|V | |E|) O(|V |^2|E|) O(|V | + |E|) B
implemented using adjacency
lists. What is the complexity of a
breadth-first traversal of G?
140 In Prims algorithm, the True False NA NA B
additional information
maintained by the algorithm is
the length of the shortest edge
from vertex v to points already
in the tree
141 Although it requires more True False NA NA A
complicated data structures,
Prim's algorithm for a minimum
spanning tree is better than
Kruskal's when the graph has a
large number of vertices
142 If a problem is NP-complete, it True False NA NA A
must also be in NP
143 Which statement is true (I) The Only I Only III Both I and III All of these D
running time of Bellman-Ford
algorithm is T (VE) (II) Both
Dijkstras algorithm and
Bellman-Ford are based on
performing repeated relaxations
(III) The 0-1 knapsack problem is
hard to solve
144 Which of the following arrays Only II Only IV Both II and IV Both I and III A
represent descending (max)
heaps? I. [10,7,7,2,4,6] II.
[10,7,6,2,4,7] III. [10,6,7,2,4,6]
IV. [6,6,7,2,4,10]
145 Which of the following Only (a) & (e) Both (c) and (e) All of these Non of these A
statement(s) is/are correct? (a)
O(n log n + n2) = O(n2) (b) O(n

Safi Khan | Virtual University of Pakistan


144 Computer Science MCQs for NTS / PPSC

log n + n2) = O(n2 log 2n) O(c


n2) = O(n2) where c is a
constant (d) O(c n2) = O
where c is a constant O =
O(1) where c is a constant
146 Which of the shortest path Only I Only II Only III Both II & III D
algorithms would be most
appropriate for finding paths in
the graph with negative edge
weights and cycles? I.Dijkstras
Algorithm II. Bellman-Ford
Algorithm III. Floyd Warshall
Algorithm
147 Suppose we have two problems True False NA NA A
A and B .Problem A is
polynomial-time reducible and
problem B is NP-complete. If we
reduce problem A into B then
problem A becomes
Npcomplete
148 The recurrence relation of ? 1 if n =1 T n =? -133( ) 2 (T n- +1) 1if A
Tower of Hanoi is given below n>1
149 In order to move a tower of 6 7 15 32 63 C
rings from one peg to another,
how many moves are required?
150 Edge (u, v) is a forward edge if u is a proper v is a proper Both of these None of these B
descendant of v in descendant of u in
the tree the tree
151 If, in a DFS forest of digraph G = Back edge Forward edge Cross Edge Tree Edge A
(V, E), f[u] = f[v] for an edge (u,
v) ? E then the edge is called
152 Best and worst case times of an True False NA NA A
algorithm may be same
153 Can an adjacency matrix for a True False NA NA A
directed graph ever not be
square in shape?
154 Consider the following code: O(n) O(n^3) O(n2 log n) O(n^2) A
For(j=1; j
155 Al-Khwarizmis work was True False NA NA A
written in a book titled al Kitab
almukhatasar fi hisab al-jabr
wal-muqabalah (The
Compendious Book on
Calculation by Completion and
Balancing)________
156 Abu Jafar Mohammad ibn Musa Iraq Iran Uzbekistan Turkey C
al-Khowarizmi was born in the
eighth century at Khwarizm
(Kheva), in________
157 Al-Khwarizmi died _________ around 900 around 840 around 740 around 700 B
C.E.___
158 The word Algorithm comes from Ibne-ul Hasem Abu Jafar Jaber Bin Hayan None B
the name of the muslim author Mohammad ibn
Safi Khan | Virtual University of Pakistan
145 Computer Science MCQs for NTS / PPSC

__________ Musa al-


Khowarizmi
159 An _________ is thus a Data Structure Data Process Algorithm Program C
sequence of computational
steps that
transform the input into output
160 Like a program, an algorithm is a True False NA NA B
mathematical entity, which is
not independent of a specific
programming language,
machine, or compiler
161 ________ of the courses in the Many Some Only one None A
computer science program deal
with efficient algorithms and
data structures
162 Compilers, operating systems, True False NA NA T
databases, artificial intelligence,
computer graphics and vision,
etc. use algorithm
163 The mathematical tools True False NA NA A
necessary for the analysis of
algorithms. This will focus on
asymptotics, summations,
recurrences
164 NP-complete problem are those Efficient No efficient Ordinary none B
for which ______ algorithms are
known, but no one knows for
sure whether efficient solutions
might exist
165 Analyzig algorithms in terms of running time memory running time none C
the amount of computational and memory
resources that the algorithm
requires. These resources
include mostly ________
166 Ideally this model should be a RAM Memory ROM Memory random access none C
reasonable abstraction of a machine or RAM
standard generic single-
processor machine. We call this
model a ________
167 A RAM is an idealized machine an infinitely large with Instructions single processor all D
with________ random-access are executed one- machine
memory by-one
(there is no
parallelism)
168 We assume that in RAM same different constant none A
machine , each basic operation
takes the ________ constant
time to execut
169 A point p in 2-dimensional space True False NA NA A
be given by its integer
coordinates, p = (p.x, p.y)
170 A point p is not said to be True False NA NA A
dominated by point q if q.x p.x
Safi Khan | Virtual University of Pakistan
146 Computer Science MCQs for NTS / PPSC

and q.y p.y


171 Given a set of n points, P = {p1, maximal mininal average none A
p2, . . . , pn} in 2-space a point is
said to be _________ if it is not
dominated by any other point in
P
172 Brute-force algorithm is defined True False NA NA A
as ,It is a very general
problemsolving
technique that consists of
systematically enumerating all
possible candidates for the
solution and checking whether
each candidate satisfies the
problem's statement
173 There are no formal rules to the True False NA NA A
syntax of the pseudo code
174 _________ is the average Worst-case time Average-case time Constant-case none B
running time over all inputs of time
size n. Let p(I) denote the
probability of seeing this input.
The average-case time is the
weighted sum of running times
with weights
175 When n is large, n^2 term will True False NA NA A
be much larger than the n term
and will dominate the running
time
176 We will say that the worst-case the asymptotic itteration growth recursive growth none A
running time is (n^2). This is growth rate of the rate of the rate of the
called ________ function function function
177 Given a finite sequence of True False NA NA A
values a1, a2, . . . , an, their sum
a1 + a2 + . . . + an is expressed in
summation notation as Sigma
(i=1 --> n)ai
178 We write out the loops as True False NA NA A
summations and then solve the
summations
179 A point p is said to dominated True False NA NA A
by point q if p.x q.x and p.y
q.y
180 We introduced a brute-force O(n) time O(n^2) time O(nlogn) time O(n^3) time B
algorithm that ran in _________
181 The problem with the brute- intelligence no intelligence NA NA B
force algorithm is that it uses
________ in pruning out
decisions
182 Consider the following T(n) = T(n-1) +1 T(n) = nT(n-1) +1 T(n)= T(n-1) +n T(n)=T(n(n-1)) +1 D
Algorithm: Factorial (n){ if (n=1)
return 1 else return (n *
Factorial(n-1)) { Recurrence for
the following algorithm is:
Safi Khan | Virtual University of Pakistan
147 Computer Science MCQs for NTS / PPSC

183 In digraph G=(V,E) ;G has cycle if The DFS forest The DFS forest has The DFS forest BFS forest has B
and only if has forward edge back edge has both back forward edge
and forward
edge
184 You have an adjacency list for G, (V+E) ? (V E) ? (V) ? (V^2) A
what is the time complexity to
compute Graph transpose G^T.?
185 If you find yourself in maze the BFS DFS Level order BFS and DFS B
better traversal approach will be both are valid
186 This follows from the fact that symmetric transitive non-transitive none B
dominance relation is
_________
187 This approach of solving plane sweep brute force NA NA A
geometric problems by
sweeping a line across the plane
is called ________
188 Sorting takes _______ time O(n) O(n^2) O(n log n) none C
189 Plane-sweep Algorithm, the can cannot NA NA B
inner while-loop _______
execute more than n times over
the entire course of the
algorithm
190 The runtime of entire plane- True False NA NA A
sweep algorithm is O(n log
n)___
191 For n = 1, 000, 000, if plane- 14 hours 14 minutes 14 second none A
sweep takes 1 second, the
bruteforce will take about
______
192 If n is not very large, then may may be not will none B
almost any algorithm _____ be
fast
193 This is written as f(n) E O(g(n)) different same NA NA B
That is, f(n) and g(n) are
asymptotically equivalent. This
means that they have
essentially the _______ growth
rates for large n
194 Lower bound f(n) = 8n2 + 2n 3 True False NA NA A
grows asymptotically at least as
fast as n^2
195 Upper bound f(n) grows no True False NA NA A
faster asymptotically than n^2
196 Ancient Roman politicians True False NA NA A
followed an important principle
of good algorithm design known
as Divide and Conquer Strategy
197 The main elements to a divide- Divide: the Conquer: solve Combine: the All of the above D
and-conquer solution problem into a each piece by pieces together
are_______ small number of applying divide into a global
pieces and conquer to it solution
recursively
198 The merge sort algorithm works Divide: split A Conquer: sort each Combine: merge All of the above D
Safi Khan | Virtual University of Pakistan
148 Computer Science MCQs for NTS / PPSC

by ________ down the middle subsequence by the two sorted


into two calling merge sort subsequences
subsequences, recursively on each into a single
each of size sorted list
roughly n/2
199 MERGE-SORT( array A, int p, int True False NAN NA A
r)
1 if (p < r)
2 then
3 q (p + r)/2
4 MERGE-SORT(A, p, q) // sort
A[p..q]
5 MERGE-SORT(A, q + 1, r) //
sort A[q + 1..r]
6 MERGE(A, p, q, r) // merge the
two pieces
200 Define the ______ of an Rank Degree NA NA A
element to be one plus the
number of elements that are
smaller
201 Thus, the rank of an element is sorted unsorted unchanged same A
its final position if the set is
202 The minimum is of rank ____ 0,1 0,n 1,n none C
and the maximum is of rank
___.___
203 Floor and ceilings ________ a are not are sometime none B
pain to deal with
204 Iteration _______ powerful is a not a might be is a very none C
technique for solving
recurrences
205 Merge of two lists of size m/2 to True False NA NA A
a list of size m takes (m) time,
which we will just write as m
206 Define the ______ of an degree rank frequency weight B
element to be one plus the
number of elements that are
smaller
207 The rank of an element is its true false NA NA A
final position if the set is
sorted________
208 Given a set A of n distinct Merge Sort Selection Sort Maximal none B
numbers and an integer k, 1 k
n, output the element of A of
rank k.This problem is of type
209 If n is odd then the median is n n-1 (n+1)/2 n/2 C
defined to be element of rank
______
210 When n is even, for median , n/2 (n + 1)/2 n/2 and (n + 1)/2 none C
there are two choices:
________
211 Medians are useful as a mode average probability central tendency D
measures of the ____________
of a set
Safi Khan | Virtual University of Pakistan
149 Computer Science MCQs for NTS / PPSC

212 Central tendency of a set is skewed not skewed highly skewed straight C
useful when the distribution of
values is ________
213 In particular, is it possible to no yes yes. However, NA C
solve the selections problem in the solution is
O(n) time? far from obvious
214 A very important special case of True False NA NA A
divide-and-conquer, which I call
the sieve technique
215 We think of divide-and-conquer True False NA NA A
as breaking the problem into a
small number of bigger sub-
problems, which are then solved
recursively
216 The sieve technique is a special 3 2 just 1 0 C
case, where the number of
subproblems is _____
217 In particular large enough True False NA NA A
means that the number of items
is at least some fixed constant
fraction of n (e.g. n/2, n/3)
218 Ideally, x (pivot) should have a True False NA NA A
rank that is neither too large or
too small
219 In sorting, we are given an array True False NA NA A
A[1..n] of n numbers We are to
reorder these elements into
increasing (or decreasing) order
220 More generally, A is an array of True False NA NA A
objects and we sort them based
on one of the attributes - the
key value
221 There are a number of well- fast slow NA NA B
known _________ O(n^2)
sorting algorithms
222 Scan the array. Whenever two Insertion sort Bubble sort Selection sort none B
consecutive items are found
that are out of order, swap
them. Repeat until all
consecutive items are in order.
It is called _________
223 Assume that A*1..i 1+ have Bubble sort Selection sort Merge sort none D
already been sorted. Insert A[i]
into its proper position in this
sub array. Create this position
by shifting all larger elements to
the right.It is called _________
224 Assume that A*1..i 1+ have Selection sort Bubble sort Merge sort Insertion sort D
already been sorted. Insert A[i]
into its proper position in this
sub array. Create this position
by shifting all larger elements to
the right
Safi Khan | Virtual University of Pakistan
150 Computer Science MCQs for NTS / PPSC

225 In the worst case time Bubble sort Selection sort Insertion sort All of the above D
_________ run in O(n2)
226 A __________ is a left-complete BST AVL Tree Perfect tree Heap D
binary tree that conforms to the
heap order
227 The heap order property stated (max) heap (min) heap NA NA B
that in a ___________ , for
every node X, the key in the
parent is smaller than or equal
to the key in X
228 In a _______ heap, the parent (max) heap (min) heap NA NA A
has a key larger than or equal
both of its children
229 Thus the smallest key is in the max heap, min min heap , max max heap , max min heap , min B
root in a_________ ; in the heap heap heap heap
_________the largest is in the
root
230 One of the clever aspects of lists BST trees heaps none C
________ is that they can be
stored in arrays without using
any pointers
231 We store the tree nodes in True False NA NA A
level-order traversal in heap
sort
232 Access to nodes involves simple True False NA NA A
arithmetic operations:
shown in below
left(i) : returns 2i, index of left
child of node i.
right(i) : returns 2i + 1, the right
child.
parent(i) : returns bi/2c, the
parent of i.
233 The root is at position 1 of the True False NA NA A
array
234 There is one principal operation Heapify Heapify Program Heapify Routine none A
for maintaining the heap Procedure
property
235 It is called Heapify. (In other True False NA NA A
books it is sometimes called
sifting down.)
236 __________ is a graphical Segma Notation Thita Notation Flowchart Asymptotic C
representation of an algorithm notation
237 What will be the total number n^2 n^n/2 n n^8 A
of max comparisons if we run
brute-force maxima algorithm
with n elements?
238 Function is given like 4n^4+ theata(n^4) theata(n^3) theata(4n^4+ theata(4n^4+ A
5n^3+n what is the run time of 5n^3) 5n^3)
this
239 Let us say we have an algorithm 90 seconds 9 seconds 0.9 seconds 0.09 seconds B
that carries out N^2 operations
for an input of size N. Let us say
Safi Khan | Virtual University of Pakistan
151 Computer Science MCQs for NTS / PPSC

that a computer takes 1


microsecond (1/1000000
second) to carry out one
operation. How long does the
algorithm run for an input of
size 3000?
240 The appropriate big thita ?(n) O(2^n) O(n^2) O(n^2logn) C
classification of the given
function. f(n) = 4n2 + 97n + 1000
is
241 Which sorting algorithm is O (n log n) O (n^2) O (n+k) O (n^3) C
faster?
242 If algorithm A has running time Both have same A is asymptotically B is None of others A
7n^2 + 2n + 3 and algorithm B asymptotic time greater asymptotically
has running time 2n^2, then complexity greater
243 What is the solution to the O(logn) O(n) O(nlogn) O(n^2) A
recurrence T(n) = T(n/2)+n
244 How much time merge sort (n^2) T(n) T( log n) T(n log n) B
takes for an array of numbers?
245 Consider the following T(n) = T(n-1) +1 T(n) = nT(n-1) +1 T(n)= T(n-1) +n T(n)=T(n(n-1)) +1 D
Algorithm:
Factorial (n){ if (n=1) return 1
else return (n * Factorial(n-1)) }
Recurrence for the following
algorithm is:
246 For the Sieve Technique we take T(nk) T(n / 3) 4 n^2 n/3 A
time
247 Sieve Technique applies to n items phases pointers constant A
problems where we are
interested in finding a single
item from a larger set of
________
248 In Sieve Technique we do not True False NA NA A
know which item is of interest
249 For the sieve technique we recursively mathematically accurately precisely A
solve the problem

Safi Khan | Virtual University of Pakistan


152 Computer Science MCQs for NTS / PPSC

CS601-Data Communication
ID Qus A B C D Ans
1 In a _______ connection, Point-to-point Primary Multipoint Secondary C
more than two devices can
share a single link
2 Communication between a Communication Half-duplex Simplex Automatic C
computer and a keyboard between a
involves __________ computer and a
transmission keyboard
involves ______
transmission
3 In a network with 25 Star Mesh Bus Ring B
computers, which topology
would require the most
extensive cabling?
4 Which topology requires a Star Mesh Bus Ring A
central controller or hub?
5 The _______ is the physical Protocol Medium Signal All of the above B
path over which a message
travels
6 Which organization has ITU-T IEEE ISO FCC D
authority over interstate
and international commerce
in the communications
field?
7 The information to be Medium Protocol Transmission Message D
communicated in a data
communications system is
the ________
8 Frequency of failure and Performance Security Reliability Feasibility C
network recovery time after
a failure are measures of the
_______ of a network
9 In _______ transmission, Full-duplex Simplex Half-duplex Half-Simplex A
the channel capacity is
shared by both
communicating devices at
all times
10 An unauthorized user is a Performance Reliability Security All of the above C
network _______ issue
11 Which topology requires a Mesh Star Ring Bus D
multipoint connection?
12 A television broadcast is an Half-duplex Full-duplex Simplex Automatic C
example of _______
transmission
13 A _______ connection Multipoint Point-to-Point Primary Secondary B
provides a dedicated link
between two devices
14 A cable break in a _______ Mesh Star Primary Bus B
topology stops all
transmission
15 The _______ layer changes Physical Transport None of the above Data link A

Safi Khan | Virtual University of Pakistan


153 Computer Science MCQs for NTS / PPSC

bits into electromagnetic


signals
16 The physical layer is Programs Protocols Bits Dialogs C
concerned with the
transmission of _______
over the physical medium
17 Mail services are available Data link Physical Application Transport C
to network users through
the _______ layer
18 As the data packet moves Added Rearranged Modified Subtracted D
from the lower to the upper
layers, headers are _______
19 As the data packet moves Removed Added Rearranged Modified B
from the upper to the lower
layers, headers are _______
20 The _______ layer lies Data link Physical Transport None of the C
between the network layer above
and the application layer
21 Layer 2 lies between the Data link Network Transport None of the B
physical layer and the above
_______ layer
22 When data are transmitted Application Physical Transport None of the C
from device A to device B, above
the header from A's layer 4
is read by B's _______ layer
23 Which layer functions as a Network layer Transport layer Physical layer Application B
liaison between user layer
support layers and network
support layers?
24 What is the main function of Process-to- Node-to-node delivery Synchronization Updating and A
the transport layer? process delivery maintenance of
routing tables
25 Which of the following is an Remote log-in File transfer and access Mail service All the above D
application layer service?
26 The Internet model consists 3 5 7 8 B
of _______ layers
27 The process-to-process Physical Network Transport Application C
delivery of the entire
message is the responsibility
of the _______ layer
28 The _______ layer is the Network Physical Data link Transport B
layer closest to the
transmission medium
29 Before data can be Electromagnetic Periodic signals Aperiodic signals Low-frequency A
transmitted, they must be signals sine waves
transformed to ________
30 When one of the Is less than zero Is greater than zero Is zero (a) or (b) B
components of a signal has
a frequency of zero, the
average amplitude of the
signal ________
31 A periodic signal can always Exactly an odd A set of sine waves, one of A set of sine waves None of the C
be decomposed into number of sine which must have a phase above
Safi Khan | Virtual University of Pakistan
154 Computer Science MCQs for NTS / PPSC

________ waves of 0
32 A periodic signal completes 1 Hz 100 Hz 1 KHz 1 MHz C
one cycle in 0.001 s. What is
the frequency?
33 In a frequency-domain plot, Frequency Peak amplitude Phase Slope A
the horizontal axis measures
the ________
34 34. In a time-domain plot, Frequency Phase Amplitude Time C
the vertical axis is a measure
of ________
35 In a time-domain plot, the Signal amplitude Time Frequency Phase B
horizontal axis is a measure
of ________
36 If the bandwidth of a signal 5 KHz 10 KHz 47 KHz 57 KHz D
is 5 KHz and the lowest
frequency is 52 KHz, what is
the highest frequency?
37 What is the bandwidth of a 3.96 MHz 36 MHz 360 KHz 396 KHz A
signal that ranges from 40
KHz to 4 MHz?
38 As frequency increases, the Decreases Increases Remains the same Doubles A
period ________
39 When propagation speed is Throughput Wavelength of the signal Distance a signal or Distortion C
multiplied by propagation bit has traveled factor
time, we get the ________
40 Propagation time is Inversely; Inversely; inversely Directly; inversely Directly; C
________ proportional to directly directly
distance and ________
proportional to propagation
speed
41 Wavelength is ________ Directly; directly Inversely; directly Directly; inversely Inversely; A
proportional to propagation inversely
speed and ________
proportional to period
42 Which of the following can Phase Power Frequency All the above C
be determined from a
frequency-domain graph of
a signal?
43 Which of the following can Phase Bandwidth Power All the above B
be determined from a
frequency-domain graph of
a signal?
44 In a frequency-domain plot, Frequency Peak amplitude Phase Slope B
the vertical axis measures
the ________
45 Given two sine waves A and One-half Twice The same as Indeterminate B
B, if the frequency of A is from
twice that of B, then the
period of B is ________ that
of A
46 The wavelength of green Greater than Less than Equal to None of the B
light in air is ________ the above
wavelength of green light in
Safi Khan | Virtual University of Pakistan
155 Computer Science MCQs for NTS / PPSC

fiber-optic cable
47 Using the Shannon formula The signal is The signal is less than the The signal is Not enough A
to calculate the data rate for equal to the noise greater than the information is
a given channel, if C = B, noise noise given to
then ________ answer the
question
48 A sine wave is ________ Aperiodic and Periodic and discrete Aperiodic and Periodic and D
continuous discrete continuous
49 If the maximum amplitude 2 1 -2 Between -2 and C
of a sine wave is 2 V, the 2
minimum amplitude is
________ V
50 A signal is measured at two P2 is zero P2 equals P1 P2 is much larger P2 is much B
different points. The power than P1 smaller than P1
is P1 at the first point and
P2 at the second point. The
dB is 0. This means
________
51 ________ is a type of Distortion Noise Decibel Attenuation D
transmission impairment in
which the signal loses
strength due to the
resistance of the
transmission medium
52 ________ is a type of Attenuation Noise Distortion Decibel C
transmission impairment in
which the signal loses
strength due to the different
propagation speeds of each
frequency that makes up
the signal
53 ________ is a type of Attenuation Noise Distortion Decibel B
transmission impairment in
which an outside source
such as crosstalk corrupts a
signal
54 The ________ has units of Throughput Propagation time Propagation speed (b) and C
meters/second or
kilometers/second
55 ________ has units of Throughput Propagation speed Propagation time (b) and A
bits/second
56 The ________ has units of Throughput Propagation time Propagation speed (a) and (b) B
seconds
57 The wavelength of a signal Frequencies of Medium Phase of the signal (a) and (b) D
depends on the ________ the signal
58 Which encoding technique NRZ BnZS AMI (a) and (b) B
attempts to solve the loss of
synchronization due to long
strings of 0s?
59 Block coding can help in Synchronization Error detection Attenuation (a) and (b) D
_______ at the receiver
60 In _______ transmission, Parallel Asynchronous serial Synchronous serial (a) and (b) A
bits are transmitted
Safi Khan | Virtual University of Pakistan
156 Computer Science MCQs for NTS / PPSC

simultaneously, each across


its own wire
61 Unipolar, bipolar, and polar Block Line NRZ Manchester B
encoding are types of
_______ encoding
62 _______ encoding has a RZ Manchester Differential All the above D
transition at the middle of Manchester
each bit
63 _______ encoding has a Differential RZ Manchester All the above A
transition at the beginning Manchester
of each 0 bit
64 PCM is an example of Analog-to- Analog-to-digital Digital-to-digital Digital-to- B
_______ conversion analog analog
65 If the frequency spectrum of 500 samples/s 1000 samples/s 200 samples/s 1200 samples/s D
a signal has a bandwidth of
500 Hz with the highest
frequency at 600 Hz, what
should be the sampling rate,
according to the Nyquist
theorem?
66 One factor in the accuracy Number of bits Signal bandwidth Carrier frequency Baud rate A
of a reconstructed PCM used for
signal is the _______ quantization
67 In asynchronous Fixed A function of the data rate Variable Zero C
transmission, the gap time
between bytes is _______
68 Synchronous transmission A start bit A stop bit Gaps between All the above D
does not have _______ bytes
69 Which encoding type always Polar Bipolar Unipolar All the above C
has a nonzero average
amplitude?
70 Which of the following Manchester NRZ-L RZ NRZ-I B
encoding methods does not
provide for synchronization?
71 In PCM, an analog-to- Analog Digital QAM Differential B
_______ conversion occurs
72 If the maximum value of a 4 5 6 7 C
PCM signal is 31 and the
minimum value is -31, how
many bits were used for
coding?
73 RZ encoding involves Five Four Three Two C
_______ signal levels
74 Which quantization level 2 8 16 32 D
results in a more faithful
reproduction of the signal?
75 In _______ transmission, Asynchronous Synchronous serial Parallel (a) and (b) D
bits are transmitted over a serial
single wire, one at a time
76 In _______ transmission, a Synchronous Asynchronous serial Parallel (a) and (b) B
start bit and a stop bit frame serial
a character byte
77 If a symbol is composed of 3 2 4 8 16 C
Safi Khan | Virtual University of Pakistan
157 Computer Science MCQs for NTS / PPSC

bits, there are _______ data


levels
78 The Nyquist theorem Twice the Twice the highest Equal to the lowest Equal to the B
specifies the minimum bandwidth of a frequency of a signal frequency of a highest
sampling rate to be_______ signal signal frequency of a
signal
79 Pulse rate is always _______ Less than Less than or equal to Greater than Greater than or B
the bit rate equal to
80 AM and FM are examples of Analog-to- Analog-to-digital Digital-to-digital Digital-to- A
________ modulation analog analog
81 In QAM, both phase and Frequency Bit rate Amplitude Baud rate C
________ of a carrier
frequency are varied
82 Which of the following is PSK FSK QAM ASK D
most affected by noise?
83 ASK, PSK, FSK, and QAM are Analog-to- Analog-to-digital Digital-to-digital Digital-to- D
examples of ________ analog digital
modulation
84 If the baud rate is 400 for a 1600 100 800 400 100 B
4-PSK signal, the bit rate is
________ bps
85 If the bit rate for an ASK 300 400 600 1200 D
signal is 1200 bps, the baud
rate is ________
86 As the bit rate of an FSK Remains the Decreases Increases Doubles C
signal increases, the same
bandwidth ________
87 In 16-QAM, there are 16 Phases Combinations of phase Amplitudes bps B
________ and amplitude
88 Which modulation FSK ASK 4-PSK 8-PSK D
technique involves tribits,
eight different phase shifts,
and one amplitude?
89 If the bit rate for an FSK 300 400 600 1200 D
signal is 1200 bps, the baud
rate is ________
90 If the bit rate for a QAM 300 400 1000 1200 C
signal is 3000 bps and a
signal unit is represented by
a tribit, what is the baud
rate?
91 If the baud rate for a QAM 300 400 1000 9000 D
signal is 3000 and a signal
unit is represented by a
tribit, what is the bit rate?
92 If the baud rate for a QAM 3 4 5 6 C
signal is 1800 and the bit
rate is 9000, how many bits
are there per signal unit?
93 Given an AM radio signal 705 KHz 700 KHz 710 KHz Cannot be B
with a bandwidth of 10 KHz determined
and the highest-frequency from given
component at 705 KHz, information
Safi Khan | Virtual University of Pakistan
158 Computer Science MCQs for NTS / PPSC

what is the frequency of the


carrier signal?
94 A modulated signal is Changing the Quantization of the source Changing the Sampling at the A
formed by ________ carrier wave by data modulating signal Nyquist
the modulating by the carrier wave frequency
signal
95 If FCC regulations are 5 KHz 10 KHz 200 KHz 200 KHz B
followed, the carrier
frequencies of adjacent AM
radio stations are ________
apart
96 If FCC regulations are 50 100 133 150 A
followed, ________
potential FM stations are
theoretically possible in a
given area
97 When an ASK signal is An infinite Always one sine wave Always two sine None of the A
decomposed, the result is number of sine waves above
________ waves
98 The bandwidth of an FM Bipolar Bipolar Carrier Modulating D
signal requires 10 times the
bandwidth of the _______
signal
99 Modulation of an analog Amplitude Frequency Phase Any of the D
signal can be accomplished above
through changing the
________ of the carrier
signal
100 For a telephone line, the Less than Greater than Twice Equivalent to C
bandwidth for voice is
usually _______ the
bandwidth for data
101 For a given bit rate, the Less than Equivalent to Equivalent to Twice A
minimum bandwidth for
ASK is ________ the
minimum bandwidth for FSK
102 What is the object of trellis To narrow the To increase the data rate To reduce the error To simplify C
coding? bandwidth rate modulation
103 A modulator converts Digital; analog Analog; digital PSK; FSK PSK; FSK A
a(n)________ signal to a(n)
________ signal
104 A 56K modem can download 56.6; 33.6 56.6; 56.6 33.6; 33.6 33.6; 56.6 A
at a rate of _______ Kbps
and upload at a rate of
________ Kbps
105 For FSK, as the difference For FSK, as the Decreases Increases Halves D
between the two carrier difference
frequencies increases, the between the
bandwidth ________ two carrier
frequencies
increases, the
bandwidth
________
Safi Khan | Virtual University of Pakistan
159 Computer Science MCQs for NTS / PPSC

106 The bit rate always equals FSK QAM 4-PSK All the above A
the baud rate in which type
of signal?
107 Which ITU-T modem V.32 V.33 V.34 (a) and (b) A
standard uses trellis coding?
108 In trellis coding the number Less than More than Equal to Double that of A
of data bits is ________ the
number of transmitted bits
109 Which multiplexing WDM FDM TDM None of the C
technique transmits digital above
signals?
110 Which multiplexing TDM FDM Both (a) and (b) None of the B
technique shifts each signal above
to a different carrier
frequency?
111 In TDM, for n signal sources 0 to n n n+1 n-1 B
of the same data rate, each
frame contains _______
slots
112 In TDM, the transmission 1 less than Greater than Less than Equal to B
rate of the multiplexed path
is usually _______ the sum
of the transmission rates of
the signal sources
113 DS-1 through DS-4 are Services; signals Services; lines Services; Multiplexers; B
_______ while T-1 through multiplexers signals
T-4 are _______
114 The sharing of a medium Modulation Encoding Multiplexing Line discipline C
and its link by two or more
devices is called _______
115 In AT&T's FDM hierarchy, The sampling The number of voice The number of The sampling B
the bandwidth of each rate by 4000 Hz channels by 4000 Hz voice channels by 8 rate by 8
group type can be found by bits/sample bits/sample
multiplying _______ and
adding extra bandwidth for
guard bands
116 Guard bands increase the TDM FDM Both (a) and (b) None of the B
bandwidth for _______ above
117 Which multiplexing FDM TDM WDM (a) and D
technique transmits analog
signals?
118 In a T-1 line, _______ Bit Byte DS-0 Switch B
interleaving occurs
119 Which multiplexing WDM FDM TDM None of the A
technique involves signals above
composed of light beams?
120 The VLF and LF bands use Space Ground Sky Line of sight B
_______ propagation for
communications
121 Category 1 UTP cable is Infrared Telephone Fast Ethernet Traditional B
most often used in _______ Ethernet
networks
122 BNC connectors are used by Fiber-optic UTP STP Coaxial D
Safi Khan | Virtual University of Pakistan
160 Computer Science MCQs for NTS / PPSC

_______ cables
123 Which of the following is Twisted-pair Fiber-optic cable Atmosphere Coaxial cable C
not a guided medium? cable
124 In an environment with Twisted-pair Coaxial cable The atmosphere Optical fiber D
many high-voltage devices, cable
the best transmission
medium would be
_________
125 _______ cable consists of an Coaxial Twisted-pair Fiber-optic Shielded A
inner copper core and a twisted-pair
second conducting outer
sheath
126 In fiber optics, the signal Very low- Light Radio Infrared B
source is _______ waves frequency
127 Smoke signals are an A guided A refractive medium An unguided A small or large C
example of communication medium medium medium
through _______
128 Which of the following Cellular Satellite communications Local telephone Radio C
primarily uses guided telephone system broadcasting
media? system
129 What is the major factor Outer conductor Inner conductor Diameter of cable Insulating A
that makes coaxial cable less material
susceptible to noise than
twisted-pair cable?
130 The RG number gives us Optical fibers Twisted pairs Coaxial cables All the above C
information about _______
131 Transmission media are Guided or Fixed or unfixed Determinate or Metallic or A
usually categorized as unguided indeterminate nonmetallic
_______
132 The _______ is an EIA IrDA FCC PUD B
association that sponsors
the use of infrared waves
133 In an optical fiber, the inner Less dense than Denser than The same density Another name B
core is _______ the cladding as for
134 The inner core of an optical Copper Bimetallic Glass or plastic Liquid C
fiber is _______ in
composition
135 When a beam of light Refraction Reflection Incidence Criticism B
travels through media of
two different densities, if
the angle of incidence is
greater than the critical
angle, _______ occurs
136 In _______ propagation, the Single-mode Multimode step-index Multimode graded- Multimode A
beam of propagated light is index single-index
almost horizontal, and the
low-density core has a small
diameter compared to the
cores of the other
propagation modes
137 _______ is the propagation Single-mode Multimode step-index Multimode graded- Multimode B
method subject to the index single-index
greatest distortion
Safi Khan | Virtual University of Pakistan
161 Computer Science MCQs for NTS / PPSC

138 In _______ propagation, the Single-mode Multimode step-index Multimode graded- Multimode C
core is of varying densities index single-index
139 When we talk about Metallic wires Nonmetallic wires The air None of the C
unguided media, usually we above
are referring to _______
140 Transmission media are Application Physical Network Transport B
closest to the _______ layer
141 Radio wave and microwave 3 to 300 KHz 300 KHz to 3 GHz 3 KHz to 300 GHz 3 KHz to 3000 C
frequencies range from GHz
_______
142 Optical fibers, unlike wire High-frequency Low-frequency Refraction Electromagneti D
media, are highly resistant transmission transmission c interference
to _______
143 In _______ propagation, Space Ground Sky Line of sight B
low-frequency radio waves
hug the earth
144 When the angle of incidence More than Less than Equal to None of the C
is _______ the critical angle, above
the light beam bends along
the interface
145 A parabolic dish antenna is Omnidirectional Bidirectional Horn Unidirectional D
a(n) _______ antenna
146 The telephone service An ILEC An IXC A CLEC A POP B
handled between two LATAs
is called _______
147 How many crosspoints are 2000 90 50 40 A
needed in a single-stage
switch with 40 inputs and 50
outputs?
148 The _______ is a device that Crossbar Crosspoint Modem RAM A
connects n inputs to m
outputs
149 The established telephone A CLEC An IXC An ILEC A POP C
company that provided
services in a LATA before
1966 and owns the cabling
system is called _______
150 In a crossbar with 1000 100 250 500 1000 B
crosspoints, approximately
how many are in use at any
time?
151 The _______ of a TSI Crossbar Crosspoint Transceiver Control unit D
controls the order of
delivery of slot values that
are stored in RAM
152 Which of the following is a TSI TDM bus Crosspoint (a) and (b) D
time-division switch?
153 In a time-division switch, a Control unit TDM bus Crosspoint Crossbar A
_______ governs the
destination of a packet
stored in RAM
154 A telephone network is an Circuit-switched Packet-switched Message-switched None of the A
example of a _______ above
Safi Khan | Virtual University of Pakistan
162 Computer Science MCQs for NTS / PPSC

network
155 The local loop has _______ Coaxial Fiber-optic Twisted-pair (a) and (b) C
cable that connects the
subscriber telephone to the
nearest end office
156 Trunks are transmission Twisted-pair Fiber-optic cable Satellite links (c) and (b) D
media such as _______ that cable
handle the telephone
communication between
offices
157 A new telephone company An ILEC An IXC A POP A CLEC D
that provides services in a
LATA after 1966 is called
_______
158 If the end office receives 1 2 3 4 C
two bursts of analog signals
with frequencies of 697 and
1477 Hz, then the number
_______ has been punched
159 In _______ circuit switching, Time-division Space-division Virtual Packet A
delivery of data is delayed
because data must be
stored and retrieved from
RAM
160 Data from a computer are Digital; digital Digital; analog Analog; analog Analog; digital B
_______; the local loop
handles _______ signals
161 To create a _______, TSI Multistage switch Crosspoint Packet switch B
combine crossbar switches
in stages
162 A traditional telephone line 2000 Hz 4000 Hz 2000 MHz 4000 MHz B
has a bandwidth of _______
163 SONET is a standard for Twisted-pair Fiber-optic cable Coaxial cable Ethernet D
_______ networks cable
164 _______ limit the Fiber nodes Repeaters Filters Hubs C
bandwidth of the local loop
to 4 KHz
165 The actual bit rate of ADSL 6 to 30 Kbps 64 Kbps to 1 Mbps 500 Kbps to 8 31 Kbps to 255 C
downstream data is Mbps Mbps
_______
166 _______ is a device at the A filter A splitter A DSLAM An ADSL C
telephone company site modem
that can packetize data to
be sent to the ISP server
167 The standard for data DOCSIS CMTS MCNS ADSL A
transmission over an HFC
network is called _______
168 DMT is a modulation FDM; TDM QDM; QAM PSK; FSK FDM; QAM D
technique that combines
elements of _______ and
_______
169 The _______ is an HFC DOCSIS MCNS CM CMTS D
network device installed
Safi Khan | Virtual University of Pakistan
163 Computer Science MCQs for NTS / PPSC

inside the distribution hub


that receives data from the
Internet and passes them to
the combiner
170 172. HDSL encodes data 6B/8T 4B/5B 2B1Q 1B2Q C
using _______
171 _______ encoded signal is An AMI; a 2B1Q An AMI; a 2B2Q A 2B1Q; an AMI None of the A
more susceptible to above
attenuation than _______
encoded signal
172 Another name for the cable Fiber node Combiner Head end Splitter C
TV office is the _______
173 A traditional cable TV Upstream and Upstream Downstream None of the C
network transmits signals downstream above
______
174 _______ was designed as an VDSL SDSL HDSL ADSL C
alternative to the T-1 line
175 The synchronous payload Pointers User data Overhead (c) and (b) D
envelope of an STS-1 frame
contains _______
176 _______ has a higher VDSL ADSL SDSL (a) and (b) D
transmission rate in the
downstream direction than
in the upstream direction
177 An HFC network uses UTP STP Optical fiber Coaxial cable C
_______ as the medium
from the switch to the fiber
node
178 In an HFC network, the Modulation Distribution Splitting (a) and (b) D
distribution hub handles the
_______ of signals
179 A TV channel in an HFC 369 6 100 250 B
network needs a _______-
MHz bandwidth
180 _______ data go from the Downstream Upstream Midstream None of the B
subscriber to the Internet above
181 In an HFC network, the PCM QAM QPSK ASK B
upstream data are
modulated using the
_______ modulation
technique
182 _______ is suitable for SDSL VDSL ADSL (a) and (b) A
businesses that require
comparable upstream and
downstream data rates
183 SONET is an acronym for Standard Optical Symmetric Open Synchronous Standard Open C
_______ Network Optical
184 The largest portion of the Voice Downstream data Upstream data Control data B
bandwidth for ADSL carries communication
_______
185 In a SONET system, _______ An add/drop A repeater An STS multiplier A regenerator A
can remove signals from a multiplexer
path
Safi Khan | Virtual University of Pakistan
164 Computer Science MCQs for NTS / PPSC

186 Which of the following best A single bit is A single bit is inverted per A single bit is Any of the C
describes a single-bit error? inverted transmission inverted per data above
unit
187 Which error detection Simple parity Checksum Two-dimensional CRC B
method uses ones check parity check
complement arithmetic?
188 Which error detection Two- CRC Simple parity check Checksum C
method consists of just one dimensional
redundant bit per data unit? parity check
189 Which error detection CRC Simple parity check Two-dimensional Checksum A
method involves parity check
polynomials?
190 If the ASCII character G is Single-bit Multiple-bit Burst Recoverable C
sent and the character D is
received, what type of error
is this?
191 If the ASCII character H is Burst Recoverable Single-bit Multiple-bit C
sent and the character I is
received, what type of error
is this?
192 In cyclic redundancy The remainder The divisor The quotient The dividend A
checking, what is the CRC?
193 Which error detection Simple parity Two-dimensional parity CRC (a) and (b) D
method involves the use of check check
parity bits?
194 In cyclic redundancy The same size as 1 bit more than 1 bit less than 2 bits more B
checking, the divisor is than
_______ the CRC
195 If the data unit is 111111, 111111011 1010110 111111110 110111111 C
the divisor 1010, and the
remainder 110, what is the
dividend at the receiver?
196 Which error detection Simple parity Checksum Two-dimensional CRC C
method consists of a parity check parity check
bit for each data unit as well
as an entire data unit of
parity bits?
197 If the data unit is 111111 1111110000 111111000 111111 1111111010 B
and the divisor 1010, what is
the dividend at the
transmitter?
198 If odd parity is used for Indeterminate 42 Even Odd D
ASCII error detection, the
number of 0s per 8-bit
symbol is _______
199 In CRC there is no error if Nonzero The quotient at the sender Equal to the Zero D
the remainder at the remainder at the
receiver is _______ sender
200 At the CRC generator, 0s are 1s are The CRC remainder The polynomial C
_______ added to the data is is
unit after the division
process
201 The sum of the checksum -0 +0 The complement of The A
Safi Khan | Virtual University of Pakistan
165 Computer Science MCQs for NTS / PPSC

and data at the receiver is the checksum complement of


_______ if there are no the data
errors
202 In CRC the quotient at the Becomes the Becomes the divisor at the Is the remainder Is discarded D
sender _______ dividend at the receiver
receiver
203 The Hamming code is a Error detection Error correction Error encapsulation (a) and (b) D
method of _______
204 At the CRC checker, A string of A nonzero remainder A string of 0s A string of 1s B
_______ means that the alternating 1s
data unit is damaged and 0s
205 Which error detection Simple parity Two-dimensional parity CRC All the above D
method can detect a single- check check
bit error?
206 Which error detection The parity check Two-dimensional parity CRC (c) and (b) D
method can detect a burst check
error?
207 At the CRC generator, A polynomial is A CRC remainder is 0s are 1s are C
_______ added to the data
unit before the division
process
208 HDLC is an acronym for High-duplex line Half-duplex digital link High-level data link Host double- C
_______ communication combination control level circuit
209 Flow control is needed to Overflow of the Overflow of the receiver Bit errors Collision B
prevent ________ sender buffer buffer between
sender and
receiver
210 In a Go-Back-N ARQ, if the 1 to 63 1 to 64 0 to 63 0 to 64 C
window size is 63, what is
the range of sequence
numbers?
211 For a sliding window of size 0 n n-1 n+1 B
n - 1 (n sequence numbers),
there can be a maximum of
_______ frames sent but
unacknowledged
212 When data and Backpacking Piggypacking Piggybacking A good idea C
acknowledgment are sent
on the same frame, this is
called _______
213 In _______ ARQ, if a NAK is Go-Back-N Stop-and-Wait Selective Repeat (a) and (b) A
received, only the specific
damaged or lost frame is
retransmitted
214 ARQ stands for _______ Automatic Automatic retransmission Acknowledge Automatic A
repeat request request repeat request repeat
quantization
215 In Go-Back-N ARQ, if frames 5 6 7 Any of the D
4, 5, and 6 are received above
successfully, the receiver
may send an ACK _______
to the sender
216 The shortest frame in HDLC Information Management Supervisory None of the C
Safi Khan | Virtual University of Pakistan
166 Computer Science MCQs for NTS / PPSC

protocol is usually the above


_______ frame
217 The address field of a frame Primary Secondary Tertiary (a) or (b) B
in HDLC protocol contains
the address of the _______
station
218 The HDLC _______ field Address Control Flag FCS C
defines the beginning and
end of a frame
219 A timer is set when _______ An ACK A NAK A data frame All the above C
is (are) sent out
220 For Stop-and-Wait ARQ, for n-1 n+1 n 2n C
n data packets sent,
_______ acknowledgments
are needed
221 What is present in all HDLC N(R) N(S) Code bits P/F bit D
control fields?
222 According to the PPP Networking Terminating Establishing Authenticating C
transition state diagram,
options are negotiated in
the _______ state
223 According to the PPP Networking Terminating Establishing Authenticating D
transition state diagram,
verification of user
identification occurs in the
_______ state
224 PAP requires _______ and A password; a Authentication Authentication A challenge C
_______ from the user calculated value identification; a calculated identification; a value; a
value password password
225 According to the PPP Networking Terminating Establishing Authenticating B
transition state diagram, the
link is disconnected in the
_______ state
226 In the PPP frame, the FCS Flag Control Protocol D
_______ field defines the
contents of the data field
227 According to the PPP Networking Terminating Establishing Authenticating A
transition state diagram,
exchange of user control
and data packets occurs in
the _______ state
228 _______, an (a)_______ CHAP; NCP IPCP; NCP NCP; IPCP SLIP; PPP B
protocol, establishes and
terminates a network layer
connection for IP packets
229 In the PPP frame, the Flag Protocol FCS Control D
_______ field is similar to
that of the U-frame in HDLC
230 In the PPP frame, the Protocol Address Control FCS B
_______ field has a value of
11111111 to indicate the
broadcast address of HDLC
231 What is the purpose of LCP Configuration Termination Option negotiation All the above D
Safi Khan | Virtual University of Pakistan
167 Computer Science MCQs for NTS / PPSC

packets?
232 _______ is a three-way PPP CHAP PAP (b) and (c) B
handshake for user
verification
233 A PAP packet and a CHAP Protocol FCS Address Control D
packet can be distinguished
by the value of the _______
field of the PPP frame
234 In the PPP frame, the FCS Flag Control Protocol A
_______ field is for error
control
235 CHAP authentication, the Authentication Password; authentication Challenge value; Password; C
user takes the system's identification; identification password challenge value
_______ and its own password
_______ to create a result
that is then sent to the
system
236 If an FDMA network has 1 2 8 16 C
eight stations, the medium
bandwidth has ______
bands
237 In the _______ random- CSMA/CD CSMA/CA ALOHA Token-passing B
access method there is no
collision
238 In the 1-persistent Sends Waits 0.1 s before sending Waits 1 s before Waits a time A
approach, when a station immediately sending equal to 1 - p
finds an idle line, it _______ before sending
239 _______ requires one Token ring Reservation Polling CSMA C
primary station and one or
more secondary stations
240 In the p-persistent Sends Waits 1 s before sending Sends with Sends with D
approach, when a station immediately probability 1 - p probability p
finds an idle line, it _______
241 A network using the CSMA 25 50 75 100 A
random-access method with
p equal to 0.25 will send
_______ percent of the time
after accessing an idle line
242 The 1-persistent approach 0.1 0.5 1.0 2.0 C
can be considered a special
case of the p-persistent
approach with p equal to
_______
243 _______ is a random-access FDMA CDMA MA Polling C
protocol
244 In the reservation access 5 9 10 11 C
method, if there are 10
stations on a network, then
there are _______
reservation minislots in the
reservation frame
245 A Walsh table for 16 4 8 16 32 C
stations has a chip sequence
Safi Khan | Virtual University of Pakistan
168 Computer Science MCQs for NTS / PPSC

of _______ chips
246 _______ is a controlled- FDMA TDMA CSMA Reservation D
access protocol
247 _______ is (are) a FDMA TDMA CSMA All the above D
channelization protocol
248 _______ is the access Token ring CSMA CSMA/CD CSMA/CA C
protocol used by traditional
Ethernet
249 The most primitive random Channelization ALOHA CSMA Token passing B
access method is _______
250 When a collision is detected The frame is The backoff value is A jam signal is sent The backoff C
in a network using immediately decremented by 1 by the station value is set to 0
CSMA/CD, _______ resent
251 In the _______ random- CSMA/CA ALOHA CSMA/CD Ethernet B
access method, stations do
not sense the medium
252 When a primary device asks Backing off Polling Selecting Reserving B
a secondary device if it has
data to send, this is called
_______
253 If a TDMA network has eight 1 2 8 16 A
stations, the medium
bandwidth has _______
bands
254 If a CDMA network has eight 1 2 8 16 A
stations, the medium
bandwidth has _______
bands
255 If an Ethernet destination Broadcast Unicast Multicast Any of the B
address is 08-07-06-05-44- above
33, then this is a ______
address
256 What is the hexadecimal 5A-11-55-18-AA- 5A-88-AA-18-55-F0 5A-81-BA-81-AA-0F 5A-18-5A-18- A
equivalent of the Ethernet 0F 55-0F
address 01011010
00010001 01010101
00011000 10101010
00001111?
257 Which of the following 8A-7B-6C-DE-10- 8B-32-21-21-4D-34 EE-AA-C1-23-45-32 46-56-21-1A- B
could not be an Ethernet 00 DE-F4
source address?
258 Which of the following 44-AA-C1-23-45- 46-56-21-1A-DE-F4 48-32-21-21-4D-34 43-7B-6C-DE- D
could not be an Ethernet 32 10-00
unicast destination?
259 What is the efficiency of 80 percent 20 percent 40 percent 60 percent A
8B/10B encoding?
260 A 10-station Ethernet LAN 10 1 2 5 D
uses a _______-port bridge
if the effective average data
rate for each station is 2
Mbps
261 A _______-station Ethernet 160 80 40 32 D
LAN uses a four-port bridge.
Safi Khan | Virtual University of Pakistan
169 Computer Science MCQs for NTS / PPSC

Each station has an effective


average data rate of 1.25
Mbps
262 An 80-station traditional 20 76 80 320 A
Ethernet is divided into four
collision domains. This
means that a maximum of
_______ stations contend
for medium access at any
one time
263 If an Ethernet destination Unicast Broadcast Multicast Any of the C
address is 07-01-02-03-04- above
05, then this is a ______
address
264 What is the efficiency of a 97 percent 70 percent 56 percent 12 percent B
frame in half-duplex Gigabit
Ethernet carrying 46 bytes
of data?
265 Which of the following B7-7B-6C-DE-10- 7C-56-21-1A-DE-F4 7B-AA-C1-23-45-32 83-32-21-21- B
could not be an Ethernet 00 4D-34
multicast destination?
266 Which of the following is a 1000Base-SX 1000Base-LX 1000Base-T 1000Base-CX C
four-wire Gigabit Ethernet
implementation?
267 Forty stations are on an 1.0 Mbps 2.5 Mbps 2.0 Mbps 5.0 Mbps B
Ethernet LAN. A 10-port
bridge segments the LAN.
What is the effective
average data rate of each
station?
268 A wireless LAN using FHSS 1.0 2.0 2.1 3.0 C
hops 10 times per cycle. If
the bandwidth of the
original signal is 10 MHz and
2 GHz is the lowest
frequency, the highest
frequency of the system is
_______ GHz
269 An FHSS wireless LAN has a 4 3 2 1 A
spread spectrum of 1 GHz.
The bandwidth of the
original signal is 250 MHz,
and there are ______ hops
per cycle
270 A wireless LAN using FHSS 1000 10,000 10 100 D
hops 10 times per cycle. If
the bandwidth of the
original signal is 10 MHz, the
spread spectrum is _______
MHz
271 A wireless LAN using DSSS 2 8 20 80 D
with an 8-bit chip code
needs _______ MHz for

Safi Khan | Virtual University of Pakistan


170 Computer Science MCQs for NTS / PPSC

sending data that originally


required a 10-MHz
bandwidth
272 A wireless LAN using DSSS A2 A 16 A 32 An 8 B
with _______-bit chip code
needs 320 MHz for sending
data that originally required
a 20-MHz bandwidth
273 A wireless LAN using DSSS 20 25 40 2.5 D
with a 4-bit chip code needs
10 MHz for sending data
that originally required a
_______-MHz bandwidth
274 In an ESS the _______ BSS AP Server None of the B
station is not mobile above
275 In an ESS the _______ BSS AP Server None of the B
stations are part of a wired above
LAN
276 A station with _______ No-transition BSS ESS (a) and (b) A
mobility is either stationary
or moving only inside a BSS
277 _______ combine to form a Aps Piconets BSSs ESSs B
scatternet
278 Bluetooth uses _______ in DSSS DHSS FHSS OFDM C
the physical layer
279 A _______ frame usually SIFS RTS DIFS Any of the B
precedes a CTS frame above
280 A station with _______ No-transition ESS-transition BSS-transition (b) and C
mobility can move from one
BSS to another
281 A station with _______ No-transition ESS-transition BSS-transition (b) and B
mobility can move from one
ESS to another
282 A _______ frame usually DIFS CIFS CTS None of the D
precedes an RTS frame above
283 Wireless transmission is Less More Half as None of the B
_______ prone to error above
than/as wired transmission
284 Which MAC sublayer does LLC PCF DCF (b) and D
IEEE 802.11 define?
285 What is the basic access LLC PCF DCF BFD C
method for wireless LANs as
defined by IEEE 802.11?
286 The access method for Token passing CSMA CSMA/CD CSMA/CA D
wireless LANs as defined by
IEEE 802.11 is based on
______
287 FHSS, DSSS, and OFDM are Data link Network Physical Transport C
_______ layer specifications
288 Stations do not sense the SIFS NAV RTS CTS B
medium during _______
time

Safi Khan | Virtual University of Pakistan


171 Computer Science MCQs for NTS / PPSC

289 A Bluetooth frame needs 3 625 259 A multiple of C


_______ s for hopping and 259
control mechanisms
290 In the ______ method, the DSSS FHSS OFDM HR-DSSS B
sender hops from frequency
to frequency in a specific
order
291 A wireless LAN uses Management Data Control None of the C
_______ frames for above
acknowledgment
292 A wireless LAN uses Control Data Management None of the C
_______ frames for the above
initial communication
between stations and the
access points
293 A Bluetooth network can 1 2 3 8 A
have _______ master(s)
294 A bridge forwards or filters a Source node's Layer 2 destination Layer 2 source Layer 3 B
frame by comparing the physical address address address destination
information in its address address
table to the frame's
_______
295 Repeaters function in the Network Physical (MAC) Data link (a) and (b) B
_______ layer(s)
296 A _______ is actually a Hub Bridge Router VLAN A
multiport repeater
297 A repeater takes a Resamples Reroutes Amplifies Regenerates D
weakened or corrupted
signal and _______ it
298 A bridge has access to the Network Service access point Physical (MAC) All the above C
_______ address of a
station on the same
network
299 The bridge with the least- Forwarding Designated Blocking (a) and (b) B
cost path between the LAN
and the root bridge is called
the _______ bridge
300 A system with redundant Filters Spanning trees Loops All the above C
bridges might have a
problem with _______ in
the system
301 Bridges function in the Physical (MAC) Data link Network (a) and (b) D
_______ layer(s)
302 In a VLAN, stations are Software Location Physical methods Switches A
separated into groups by methods
_______
303 A bridge can _______ Filter a frame Forward a frame Extend a LAN Do all the D
above
304 A _______ bridge has the Designated Forwarding Blocking Root D
smallest ID
305 A bridge never forwards Root Designated Blocking Forwarding C
frames out of the _______
port
Safi Khan | Virtual University of Pakistan
172 Computer Science MCQs for NTS / PPSC

306 Which type of bridge builds Transparent Simple (a) and (b) None of the A
and updates its tables from above
address information on
frames?
307 VLAN technology divides a Multiplexed Framed Physical Logical D
LAN into ______ groups
308 Which of the following is a Bridge Repeater Hub All the above D
connecting device?
309 Which station characteristic Port numbers MAC addresses IP addresses All the above D
can be used to group
stations into a VLAN?
310 _______ is a first-generation GSM IS-95 AMPS D-AMPS C
cellular phone system
311 AMPS uses _______ for FM FSK PM (a) and (b) D
modulation
312 _______ separates the CDMA TDMA FDMA b and c C
AMPS voice channels
313 _______ is a cellular GSM D-AMPS IS-95 AMPS A
telephone system popular in
Europe
314 D-AMPS uses _______ for CDMA TDMA FDMA b and c D
multiplexing
315 GSM uses _______ for CDMA TDMA FDMA b and c D
multiplexing
316 DSSS is used by the _______ AMPS IS-95 D-AMPS GSM B
cellular phone system
317 _______ base stations use GSM IS-95 AMPS D-AMPS B
GPS for synchronization
318 _______ will have 288 Teledesic Globalstar Iridium GPS A
satellites in 12 polar orbits
319 IS-95 has a frequency reuse 1 5 7 95 A
factor of _______
320 The path that a satellite An orbit A period A footprint An uplink A
makes around the world is
called _______
321 A GEO satellite has _______ A polar An inclined An equilateral An equatorial D
orbit
322 Which orbit has the highest LEO GEO MEO HEO B
altitude?
323 _______ is a second- D-AMPS GSM IS-95 All the above D
generation cellular phone
system
324 A _______ is a Cell Mobile station Base station Mobile D
computerized center that is switching
responsible for connecting center
calls, recording call
information, and billing
325 _______ has 48 satellites in Iridium Teledesic Globalstar GPS C
six polar orbits
326 The signal from a satellite is Orbit Period Footprint Uplink C
aimed at a specific area
called the _______

Safi Khan | Virtual University of Pakistan


173 Computer Science MCQs for NTS / PPSC

327 In _______, a mobile station Roaming A roaming handoff A hard handoff A soft handoff C
always communicates with
just one base station
328 MEO satellites orbit In the Above both Below both Between the D
_______ Van Allen belts
329 _______ is often used for GPS AMPS IS-95 Iridium A
navigation purposes
330 An LEO satellite has An equatorial A polar An inclined All the above B
_______ orbit
331 Teledesic is a _______ LEO Passband Broadband Little Big B
satellite system
332 _______ has 66 satellites in Globalstar Teledesic GPS Iridium D
six LEOs
333 Transmission from the Earth Downlink Uplink Footlink Up print B
to the satellite is called the
_______
334 The _______ is not used for GPS Iridium system IS-95 system Globalstar A
voice communication system
335 _______ is a Frame Relay LMI FRAD VOFR DLCI C
option that transmits voice
through the network
336 Frame Relay provides PVC SVC (a) and (b) None of the C
_______ connections above
337 Routing and switching in Physical Network Data link (b) and C
Frame Relay are performed
by the _______ layer
338 Frame Relay is unsuitable File transfers Real-time video Fixed-rate data All the above B
for ________ due to communication
possible delays in
transmission resulting from
variable frame sizes
339 he Frame Relay address field 4 bytes 2 bytes 3 bytes Any of the D
is _______ in length above
340 Because ATM _______, Is asynchronous Uses virtual circuit routing Is multiplexed Is a network B
which means that cells
follow the same path, the
cells do not usually arrive
out of order
341 _______ is a protocol to FRAD DLCI LMI VOFR C
control and manage
interfaces in Frame Relay
networks
342 Frame Relay operates in the Physical and Physical, data link, and Physical layer Data link layer A
_______ data link layers network layers
343 In the data link layer, Frame A simplified LAPB BSC protocol Any ANSI A
Relay uses _______ HDLC protocol standard
protocol
344 The VPI of an NNI is 8 12 16 24 B
_______ bits in length
345 In data communications, Automated Automatic Transmission Asynchronous Asynchronous C
ATM is an acronym for Teller Machine Model Transfer Mode Telecommunic
_______ ation Method

Safi Khan | Virtual University of Pakistan


174 Computer Science MCQs for NTS / PPSC

346 Which AAL type is designed AAL1 AAL2 AAL3/4 AAL5 D


to support SEAL?
347 Which layer in ATM protocol Physical Application adaptation Data adaptation ATM B
reformats the data received
from other networks?
348 Which layer in ATM protocol ATM Application adaptation Physical Cell A
has a 53-byte cell as an end transformation
product?
349 Which AAL type is designed AAL1 AAL2 AAL3/4 AAL5 A
to support a data stream
that has a constant bit rate?
350 The VPI of a UNI is _______ 8 12 16 24 A
bits in length
351 In an ATM network, all cells Virtual circuit Transmission path Virtual path None of the A
belonging to a single above
message follow the same
_______ and remain in their
original order until they
reach their destination
352 A device called a(n) _______ FRAD LMI VOFR DLCI A
allows frames from an ATM
network to be transmitted
across a Frame Relay
network
353 A _______ provides a Transmission Virtual circuit Virtual path None of the B
connection or a set of path above
connections between
switches
354 A _________ is the physical Virtual path Transmission path Virtual circuit None of the B
connection between an above
endpoint and a switch or
between two switches
355 On a network that uses NAT, Router Switch Server None of the A
the _______ has a above
translation table
356 Identify the class of IP Class A Class B Class C Class D D
address 229.1.2.3
357 On a network that uses NAT, An internal host An external host The router (a) or (b) A
_______ initiates the
communication
358 A subnet mask in class B can Nine Seventeen Three Fourteen B
have _______ 1s with the
remaining bits 0s
359 A subnet mask in class C can Twenty-five Twelve Seven Ten A
have _______ 1s with the
remaining bits 0s
360 Identify the class of IP Class A Class B Class C Class D A
address 4.5.6.7
361 Identify the class of IP Class A Class B Class C Class D B
address 191.1.2.3
362 A subnet mask in class A can Nine Four Thirty-three Three A
have _______ 1s with the
remaining bits 0s
Safi Khan | Virtual University of Pakistan
175 Computer Science MCQs for NTS / PPSC

363 Class _______ has the A B C D A


greatest number of hosts
per given network address
364 A subnet mask in class B has 8 32 64 128 B
nineteen 1s. How many
subnets does it define?
365 In _______ routing, the full Next-hop Host-specific Network-specific Default B
IP address of a destination is
given in the routing table
366 A subnet mask in class C has 0 2 8 16 B
twenty-five 1s. How many
subnets does it define?
367 Given the IP address 180.25.21.0 180.25.8.0 180.25.0.0 180.0.0.0 C
180.25.21.172 and the
subnet mask 255.255.192.0,
what is the subnet address?
368 Given the IP address 18.9.0.14 18.0.0.14 18.31.0.14 18.240.0.0 D
18.250.31.14 and the
subnet mask 255.240.0.0,
what is the subnet address?
369 372. _______ is a client- NAT DHCP CIDR ISP B
server program that
provides an IP address,
subnet mask, IP address of a
router, and IP address of a
name server to a computer
370 In _______, each packet of a The virtual The datagram approach to Message switching None of the B
message need not follow approach to packet switching above
the same path from sender packet switching
to receiver
371 An IP address consists of 4 8 32 Any of the B
_______ bits above
372 On a network that uses NAT, A pool of One Two None of the A
the router can use _______ above
global address(es)
373 In _______ routing, the Default Next-hop Network-specific Host-specific A
mask and destination
addresses are both 0.0.0.0
in the routing table
374 A subnet mask in class A has 8 32 64 128 C
fourteen 1s. How many
subnets does it define?
375 In which type of switching Virtual circuit Message switching Datagram packet None of the A
do all the packets of a packet switching switching above
message follow the same
channels of a path?
376 In _______ routing, the Network-specific Host-specific Next-hop Default A
destination address is a
network address in the
routing table
377 Given the IP address 201.14.78.64 201.14.78.32 201.14.78.65 201.14.78.12 A
201.14.78.65 and the
subnet mask
Safi Khan | Virtual University of Pakistan
176 Computer Science MCQs for NTS / PPSC

255.255.255.224, what is
the subnet address?
378 In error reporting the The receiver A router The sender Any of the C
encapsulated ICMP packet above
goes to _______
379 When the hop-count field Destination- Redirection Time-exceeded Parameter- C
reaches zero and the unreachable problem
destination has not been
reached, a _______ error
message is sent
380 An ARP request is _______ Multicast; one Unicast; all hosts Broadcast; all hosts Unicast; one C
to _______ host host
381 What is the maximum size 65,515 bytes 65,535 bytes 65,475 bytes 65,460 bytes A
of the data portion of the IP
datagram?
382 A best-effort delivery Error correction Error checking Datagram All the above D
service such as IP does not acknowledgment
include _______
383 An HLEN value of decimal 10 There is 10 bytes There is 40 bytes in the There is 40 bytes of There is 10 B
means _______ of options header options bytes in the
header
384 In IPv4, what is the value of 107 407 427 428 D
the total length field in
bytes if the header is 28
bytes and the data field is
400 bytes?
385 If the fragment offset has a The first byte of The datagram has not The datagram is The first byte A
value of 100, it means that the datagram is been fragmented 100 bytes in size of the
_______ byte 800 datagram is
byte 100
386 What is needed to Identification Offset number Total length (b) and D
determine the number of number
the last byte of a fragment?
387 The IP header size _______ Depends on the Is 20 to 60 bytes long Is 20 bytes long Is 60 bytes long B
MTU
388 If a host needs to Time-exceeded Time-stamp-request Source-quench Router- B
synchronize its clock with advertisement
another host, it sends a
_______ message
389 Which of the following is a Base header Extension header Data packet from (a) and D
necessary part of the IPv6 the upper layer
datagram?
390 _______ is a dynamic RARP ICMP ARP None of the C
mapping protocol in which a above
physical address is found for
a given IP address
391 A router reads the _______ MAC Source IP ARP C
address on a packet to
determine the next hop
392 The target hardware Variable Class-dependent 0x000000000000 0.0.0.0 C
address on an Ethernet is
_______ in an ARP request
393 When not all fragments of a Time-exceeded Parameter-problem Source-quench Time-stamp- A
Safi Khan | Virtual University of Pakistan
177 Computer Science MCQs for NTS / PPSC

message have been received request


within the designated
amount of time, a _______
error message is sent
394 A ______ can learn about Router; routers Router; hosts Host; routers Host; hosts C
network ______ by sending
out a router-solicitation
packet
395 Which of the following types Time-exceeded Multicasting Echo reply All the above D
of ICMP messages needs to
be encapsulated into an IP
datagram?
396 The purpose of echo Report errors Check packet lifetime Check node-to- Find IP C
request and echo reply is to node addresses
_______ communication
397 An ARP reply is _______ to Unicast; one Broadcast; all hosts Multicast; one host Unicast; all A
_______ host hosts
398 One method to alert a Source-quench Redirection Echo-request Destination- A
source host of congestion is unreachable
the _______ message
399 A time-exceeded message is The round-trip The time-to-live field has a Fragments of a b and c D
generated if _______ time between zero value message do not
hosts is close to arrive within a set
zero time
400 To determine whether a An echo-request An echo-reply A redirection A source- A
node is reachable, _______ quench
message can be sent
401 In IPv6, the _______ field in Version Hop limit Priority Next-header B
the base header restricts
the lifetime of a datagram
402 In IPv4, what is the length of 39,952 39,988 40,012 40,048 A
the data field given an HLEN
value of 12 and total length
value of 40,000?
403 A datagram is fragmented The do not The identification field is The more fragment The offset field B
into three smaller fragment bit is the same for all three bit is set to 0 for all is the same for
datagrams. Which of the set to 1 for all datagrams three datagrams all three
following is true? three datagrams datagrams
404 Errors in the header or Source-quench Parameter-problem Router-solicitation Redirection B
option fields of an IP
datagram require a ______
error message
405 The cost field of a router's Some positive 0 1 Infinity B
first table from itself always integer
has a value of _______
406 A routing table contains The destination The hop count to reach the The router ID of All the above D
_______ network ID network the next hop
407 Router B receives an update 2 3 6 7 C
from router A that indicates
Net1 is two hops away. The
next update from A says
Net1 is five hops away.
What value is entered in B's
Safi Khan | Virtual University of Pakistan
178 Computer Science MCQs for NTS / PPSC

routing table for Net1?


Assume the basic RIP is
being used
408 If the routing table contains 1 2 3 4 C
four new entries, how many
update messages must the
router send to its one
neighbor router?
409 An area border router can Only another Only another network Only another area Another router D
be connected to _______ router border router or another
network
410 Which of the following A transient link A stub link An area An B
usually has the least number autonomous
of connections to other system
areas?
411 _______ is used in a dense PIM-SM; PIM- PIM; PIM-DM PIM; PIM-SM PIM-DM; PIM- D
multicast environment while DM SM
_______ is used in a sparse
multicast environment
412 When a multicast router is Logical core Spanning tree Physical tunnel Logical tunnel D
not directly connected to
another multicast router, a
_______ can be formed to
connect the two
413 Which type of network Transient Stub Point-to-point All the above A
using the OSPF protocol can
have five routers attached
to it?
414 A WAN using the OSPF Stub Point-to-point Transient Virtual B
protocol that connects two
routers is an example of a
_______ type of OSPF
network
415 If four hosts on a network One Two membership reports Three membership Four B
belong to the same group, a membership are reports are membership
total of _______ sent in report is reports are
416 A one-to-all communication Unicast Multicast Broadcast (a) and (b) C
between a source and all
hosts on a network is
classified as a _______
communication
417 Which type of BGP message Update Open Keep-alive Notification A
announces a route to a new
destination?
418 Which layer produces the Data link Transport Application Network D
OSPF message?
419 Which of the following is an RIP OSPF BGP (a) and (b) C
exterior routing protocol?
420 An area is _______ Composed of at Another term for an Part of an AS A collection of C
least two Ass internet stub areas
421 In an autonomous system 1 n n1 n+1 C
with n areas, how many
areas are connected to the
Safi Khan | Virtual University of Pakistan
179 Computer Science MCQs for NTS / PPSC

backbone?
422 Which of the following is an RIP OSPF BGP (a) and (b) D
interior routing protocol?
423 OSPF is based on _______ Distance vector Path vector routing Link state routing (a) and (b) C
routing
424 BGP is based on _______ Distance vector Link state routing Path vector routing (a) and (b) C
routing
425 Which type of BGP message Keep-alive Open Update Notification B
creates a relationship
between two routers?
426 Which type of network Transient Stub Point-to-point Virtual C
using the OSPF protocol
always consists of just two
connected routers?
427 Which type of network Virtual Point-to-point Transient Stub A
using the OSPF protocol is
the result of a break in a link
between two routers?
428 Which type of BGP message Open Update Notification Keep-alive C
is sent by a router to close a
connection?
429 An IGMP query is sent from Router; host or Host; host Host; router Router; router A
a _______ to a _______ router
430 Which type of BGP message Keep-alive Notification Open Update A
is sent by a system to notify
another router of the
sender's existence?
431 An Ethernet LAN using the Point-to-point Stub Transient Virtual C
OSPF protocol with five
attached routers can be
called a _______ network
432 In distance vector routing Its neighbors Every router on the Every router less A table stored A
each router receives only network than two units by the network
information directly from away hosts
_______
433 A system uses group-shared 5 20 100 500 A
trees for multicasting. If
there are 100 sources and 5
groups, there is a maximum
of _______ different trees
434 _______ is a multicast DVRMP MOSPF CBT (a) and (b) D
routing protocol using
source-based trees
435 Pruning and grafting are RPM RPF RPB All the above A
strategies used in _______
436 In distance vector routing a Only when there Only when a new host is At regularly Only when a C
router sends out is a change in its added scheduled intervals new network is
information _______ table added
437 The _______ field of the Version Type Group address Checksum C
IGMP message is all zeros in
a query message
438 The _______ field of the Version Type Checksum (a) and (b) D
IGMP message is 0x11 for a
Safi Khan | Virtual University of Pakistan
180 Computer Science MCQs for NTS / PPSC

query message
439 A one-to-many Multicast Unicast Broadcast (a) and (b) A
communication between a
source and a specific group
of hosts is classified as a
_______ communication
440 A one-to-one Unicast Multicast Broadcast (a) and (b) A
communication between a
source and one destination
is classified as a _______
communication
441 ________ is a multicasting Teleconferencin Distance learning Information All the above D
application g dissemination
442 A _______ is a data Graph Leaf Tree Root C
structure with nodes and
edges and a hierarchical
structure
443 A system uses source-based 5 20 100 500 D
trees for multicasting. If
there are 100 sources and 5
groups, there is a maximum
of _______ different trees
444 In a _______ tree approach Shortest-group Source-based Spanning-source Group-shared B
to multicasting, the
combination of source and
group determines the tree
445 In a _______ tree approach Group-shared Spanning-source Shortest-group Source-based A
to multicasting, the group
determines the tree
446 _______ is a multicast DVRMP MOSPF CBT (a) and (b) C
routing protocol using
group-shared trees
447 In _______ a network can RPF RPM RPB All the above C
receive a multicast packet
from a particular source
only through a designated
parent router
448 Dijkstra's algorithm is used Create LSAs Flood an internet with Create a link state Calculate the D
to _______ information database routing tables
449 A _______ message tells an Graft Prune Weed Plum B
upstream router to stop
sending multicast messages
for a specific group through
a specific router
450 The _______ is used by a Special query General query message Membership report Leave report A
router in response to a message
received-leave report
451 RIP is based on _______ Link state Dijkstra's algorithm Path vector routing Distance vector D
routing routing
452 A _______ message tells an Weed Prune Plum Graft D
upstream router to start
sending multicast messages
for a specific group through
Safi Khan | Virtual University of Pakistan
181 Computer Science MCQs for NTS / PPSC

a specific router
453 _______ uses multicast link DVMRP CBT BVD MOSPF D
state routing concepts to
create source-based trees
454 In the _______ protocol, a DVMRP CBT MOSPF BVD B
multicast packet is
encapsulated inside a
unicast packet with the core
router as the destination
455 The _______ is an IGMP Query message Membership report Leave report All the above D
message
456 The _______ defines the Well-known port Ephemeral port number IP address Physical B
client program number address
457 The _______ timer is used in Retransmission Time-waited Persistence Keep-alive B
the termination phase
458 Which is a legal port 0 513 65,535 All the above D
address?
459 The definition of reliable Error-free Receipt of the complete In-order delivery All the above D
delivery includes _______ delivery message
460 Which of the following does Acknowledgmen Flow control Sequence numbers None of the D
UDP guarantee? ts to the sender on each user above
datagram
461 The source port address on The sending The receiving computer The application The application D
the UDP user datagram computer program on the program on the
header defines _______ receiving computer sending
computer
462 A host can be identified by A port number; An IP address; a port An IP address; a An IP address; B
_______ while a program an IP address number host address a well-known
running on the host can be port
identified by _______
463 Which of the following is Source port Checksum Length of header Destination C
not part of the UDP user address port address
datagram header?
464 The _______ defines the IP address Well-known port number Ephemeral port Physical B
server program number address
465 IP is responsible for _______ Process-to- Host-to-host; process-to- Process-to-process; Node-to-node; B
communication while TCP is process; node- process host-to-host process-to-
responsible for _______ to-node process
communication
466 The _______ timer is Persistence Keep-alive Retransmission Time-waited A
needed to handle the zero
window-size advertisement
467 Connection establishment Three-way One-way Two-way None of the A
involves a _______ above
handshake
468 A special segment called a Persistence Transmission Keep-alive Time-waited A
probe is sent by a sending
TCP when the _______
timer goes off
469 The _______ address IP address NIC Socket Host C
uniquely identifies a running
application program

Safi Khan | Virtual University of Pakistan


182 Computer Science MCQs for NTS / PPSC

470 The _______ field is used to Sequence Acknowledgment number Urgent pointer Checksum A
order packets of a message number
471 The _______ field is used for Sequence Acknowledgment number Urgent pointer Checksum D
error detection number
472 Multiply the header length 2 4 6 8 B
field by _______ to find the
total number of bytes in the
TCP header
473 Urgent data require the Sequence Control Offset Reserved B
urgent pointer field as well number
as the URG bit in the ______
field
474 In ______, data are sent or Silly window Sliding window syndrome Nagle's syndrome Delayed A
processed at a very syndrome acknowledgme
inefficient rate, such as 1 nt
byte at a time
475 The _______ timer keeps Time-waited Retransmission Persistence Keep-alive B
track of the time between
the sending of a segment
and the receipt of an
acknowledgment
476 To prevent silly window Clark's solution Nagle's algorithm Delayed (a) or (c) D
syndrome created by a acknowledgment
receiver that processes data
at a very slow rate, _______
can be used
477 To prevent silly window Nagle's Clark's solution Delayed (a) or (c) A
syndrome created by a algorithm acknowledgment
sender that sends data at a
very slow rate, _______ can
be used
478 An ACK number of 1000 999 bytes has 1000 bytes has been 1001 bytes has None of the D
always means that _______ been successfully received been successfully above
successfully received
received
479 The _______ timer prevents Keep-alive Time-waited Retransmission Persistence A
a long idle connection
between two TCPs
480 UDP and TCP are both Physical Data link Network Transport D
_______ layer protocols
481 Which of the following End-to-end Process-to-process Host-to-host All the above B
functions does UDP reliable data communication communication
perform? delivery
482 UDP needs the _______ Application Internet Physical Port D
address to deliver the user
datagram to the correct
application program
483 Karn's algorithm is used in Time-waited Retransmission Persistence Keep-alive B
calculations by the _______
timer
484 Slow start is used in Multiplicative Multiplicative decrease Additive increase Additive C
conjunction with _______ as increase decrease
a TCP congestion control
Safi Khan | Virtual University of Pakistan
183 Computer Science MCQs for NTS / PPSC

strategy
485 The maximum length of Effective Average data rate Maximum burst Constant bit C
time that traffic is generated bandwidth size rate
at the peak rate is called the
_______
486 For a system using TCP, the Receiver Sender Congestion (a) and (c) D
sender window size is
determined by the _______
window sizeFor a system
using TCP, the sender
window size is determined
by the _______ window size
487 _______ traffic features Constant-bit- Bursty Variable-bit-rate Peak-bit-rate B
sudden data rate changes in rate
very short periods of time
488 When the load is greater Decreases Goes to infinity Increases linearly Goes to zero B
than the capacity, the delay
_______
489 _______ is a closed-loop A choke point Implicit signaling Explicit signaling All the above D
mechanism to alleviate
congestion
490 The FECN informs the Sender; Interface; sender Destination; Destination; D
_________ of congestion destination interface sender
while the BECN informs the
_______ of congestion
491 The _______ is the Average data Maximum burst size Effective Peak data rate D
maximum data rate of the rate bandwidth
traffic
492 _______ is a flow Choke point Additive increase Jitter Throughput B
characteristic in which the
delay varies for packets
belonging to the same flow
493 In _______ queuing the first Priority Weighted fair FIFO LIFO C
packet into the queue is the
first packet out of the queue
494 In Frame Relay the Bc The access rate Be CIR B
transmission rate can never
exceed _______
495 _______ measures the SCR CVDT PCR MCR B
variation in cell transmission
time
496 If the SCR is 60,000, the PCR 60,000 70,000 55,000 5000 C
is 70,000, and the MCR is
55,000, what is the
minimum number of cells
that can be sent per
second?
497 The _______ traffic shaping Leaky bucket Traffic bucket Token bucket Bursty bucket C
method gives a host credit
for its idle time
498 A flow-based QoS model RSVP Integrated Services Differentiated Multicast trees B
designed for IP is called Services
_______
Safi Khan | Virtual University of Pakistan
184 Computer Science MCQs for NTS / PPSC

499 A signaling protocol that RSVP Integrated Services Differentiated Multicast trees A
helps IP create a flow is Services
called _______
500 RSVP uses _______ Path Resv Resource (a) and (b) D
messages
501 In an RSVP reservation style Fixed Shared explicit Wild card All the above B
called _______ filter, the
router creates a single
reservation that can be
shared by a set of flows
502 Differentiated Services was Stability Reservation Scalability All the above C
designed to handle the
_______ problem associated
with Integrated Services
503 A _______ is a Meter Marker Shaper None of these C
Differentiated Services
traffic conditioner
504 What is the relationship CIR plus Be is CIR is always equal to the CIR is greater than CIR is less than D
between the access rate and equal to the access rate the access rate the access rate
the CIR? access rate
505 If the maximum CTD is 10 s CDV CLR CTD CER A
and the minimum CTD is 1
s, the _______ is 9 s
506 A Frame Relay network is Be Bc CIR (a) and (b) B
committed to transfer
_______ bps without
discarding any frames
507 The effective bandwidth is Average data Peak data rate Maximum burst All the above D
based on _______ rate size
508 The cell _______ is the Delay variation Error ratio Loss ratio Transfer delay A
difference between the CTD
maximum and minimum
509 The cell _______ is the ratio Delay variation Error ratio Loss ratio Transfer delay C
of lost cells to cells sent
510 The _______ service class is CBR ABR VBR UBR B
particularly suitable for
applications with bursty
data
511 The _________ service class ABR CBR VBR UBR B
is suitable for customers
who need real-time video
transmission without
compression
512 The _______ is greater than MCR CVDT PCR All the above C
the SCR
513 The _______ is the fraction CLR CER CTD CDV B
of the cells delivered in
error
514 When added to Be, Bc CIR Committed burst size Access rate (a) and (b) C
should be less than the
_______
515 A connectionless iterative Well-known Ephemeral Active (a) and (b) A
server uses _______ ports
Safi Khan | Virtual University of Pakistan
185 Computer Science MCQs for NTS / PPSC

516 The _______ socket is used Raw Stream Datagram Remote A


with a protocol that directly
uses the services of IP
517 A _______ server serves Connectionless Connectionless concurrent Connection- Connection- A
multiple clients, handling iterative oriented iterative oriented
one request at a time concurrent
518 A client issues _______ An active A finite open An active open A passive open C
when it needs service from request
a server
519 A _______ server serves Connectionless Connectionless concurrent Connection- Connection- D
multiple clients iterative oriented iterative oriented
simultaneously concurrent
520 The server program is Finite Infinite Active Passive B
_______ because it is always
available, waiting for a client
request
521 A connection-oriented Well-known Ephemeral Active (a) and (b) D
concurrent server uses
_______ ports
522 Machine A requests service 1 2 3 4 D
X from machine B. Machine
B requests service Y from
machine A. What is the total
number of application
programs required?
523 A server program, once it An active A finite open An active open A passive open D
issues _______, waits for request
clients to request its service
524 _______ can request a A socket A client A port A server B
service interface
525 _______ can provide a An iterative A concurrent server A client (a) and (b) D
service server
526 he client program is Finite Infinite Active Passive A
_______ because it
terminates after it has been
served
527 _______ processes requests An iterative A concurrent client An iterative client A concurrent A
one at a time server server
528 The _______ socket is used Raw Stream Datagram Remote C
with a connectionless
protocol
529 _______ processes many An iterative A concurrent client An iterative client A concurrent D
requests simultaneously server server
531 In a connection-oriented Well-known port Infinite port Ephemeral port (b) and (c) A
concurrent server, the
_______ is used for
connection only
532 A _______ is an instance of Program; Process; program Process; service Structure; B
a _______ process process
533 The _______ socket is used Raw Stream Datagram Remote B
with a connection-oriented
protocol
534 In the string 107.123.46.0 107.0.0.0 219.46.123.0 107.123.0.0 B
Safi Khan | Virtual University of Pakistan
186 Computer Science MCQs for NTS / PPSC

219.46.123.107.in-
addr.arpa, what is the
network address of the host
we are looking for?
535 In _______ resolution the A cache A recursive An iterative All the above B
client is in direct contact
with at most one server
536 In address-to-name Reverse Generic Country Inverse D
resolution the _______
domain is used
537 How is the lifetime of a By the time-to- By the time-to-live counter By the time-to-live (b) and (c) D
name-to-address resolution live field set by set by the server field set by the
in cache memory the server authoritative
controlled? server
538 A DNS response is classified Authoritative Recursive Unauthoritative Iterative C
as ______ if the information
comes from a cache
memory
539 A host with the domain Fourth Fifth Third Not enough B
name pit.arc.nasa.gov. is on information
the _______ level of the given
DNS hierarchical tree. (The
root is level 1.)
540 A DNS _______ server's Secondary Root Primary All the above B
zone is the entire DNS tree
541 To find the IP address of a Inverse domain Generic domains Country domains (b) or (c) A
host when the domain
name is known, the _______
can be used
542 A DNS _______ server gets Root Primary Secondary All the above C
its data from another DNS
server
543 A DNS _______ server Root Primary Secondary All the above B
creates, maintains, and
updates the zone file
544 A host with the domain Fourth Fourth Fourth Fourth D
name trinity.blue.vers.inc is
on the _______ level of the
DNS hierarchical tree. (The
root is level 1.)
545 In the domain name fhda edu chal atc B
chal.atc.fhda.edu, _______
is the least specific label
546 In the domain name Fhda chal atc edu B
chal.atc.fhda.edu, _______
is the most specific label
547 In _______ resolution the An iterative An iterative An iterative An iterative A
client could directly contact
more than one server
548 Which of the following chal.atac.fhda.e kenz.acct.sony.jp kenz.acct.sony.jp kenz.acct.sony.j B
domain names would most du p
likely use a country domain
to resolve its IP address?
Safi Khan | Virtual University of Pakistan
187 Computer Science MCQs for NTS / PPSC

549 A resolver is the _______ A resolver is the A resolver is the _______ A resolver is the A resolver is B
_______ _______ the _______
550 Which of the following is FTP allows FTP allows a system using FTP allows a PC and All the above D
true? systems with ASCII and a system using a SUN workstation are true
different EBCDIC to transfer files to transfer files
directory
structures to
transfer files
551 An email contains a textual Multipart/parall Multipart/digest Multipart/alternati Multipart/mixe D
birthday greeting, a picture el ve d
of a cake, and a song. The
text must precede the
image. What is the content-
type?
552 During an FTP session the As many times Exactly once Exactly twice All the above B
control connection is as necessary
opened _______
553 The purpose of the MTA is Transferral of Message preparation Envelope creation (a) and (b) A
_______ messages across
the Internet
554 In anonymous FTP, the user Store files Retrieve files Navigate through Do all the B
can usually _______ directories above
555 Which part of the mail Header Body Envelope Address A
created by the UA contains
the sender and receiver
names?
556 In the email address mackenzie mackenzie@pit.arc.nasa.g pit.arc.nasa.gov (a) and (b) C
mackenzie@pit.arc.nasa.gov ov
, what is the domain name?
557 The _______ field in the Content- Content-Id Content-type Content- B
MIME header uses text to transfer- description
describe the data in the encoding
body of the message
558 The _______ field in the Content-Id Content-description Content-type Content- D
MIME header describes the transfer-
method used to encode the encoding
data
559 The _______ field in the Content- Content-type Content-Id Content- B
MIME header has type and transfer- description
subtype subfields encoding
560 A JPEG image is sent as Multipart/mixed Multipart/image Image/basic Image/JPEG D
email. What is the content-
type?
561 The purpose of the UA is Message Envelope creation Transferral of (a) and (b) D
_______ preparation messages across
the Internet
562 The _______ field in the Content-Id Content-description Content-type Content- C
MIME header is the type of transfer-
data and the body of the encoding
message
563 A message is fragmented Message/partial Multipart/partial Multipart/mixed Message/RFC8 A
into three email messages. 22
What is the content-type?
Safi Khan | Virtual University of Pakistan
188 Computer Science MCQs for NTS / PPSC

564 A client machine usually Only POP Both SMTP and POP Only SMTP None of the C
needs _______ to send above
email
565 In FTP, what attributes must Data type File structure Transmission mode All the above D
be defined by the client
prior to transmission?
566 In FTP, there are three types Data structures Transmission modes Files All the above B
of _______: stream, block,
and compressed
567 In FTP, ASCII, EBCDIC, and Data structure Transmission mode File type All the above C
image define an attribute
called _______
568 In FTP, when you _______, Retrieve a file Store a file Retrieve a list (a) and (c) D
it is copied from the server
to the client
569 In FTP, when you _______, Retrieve a file Store a file Retrieve a list Retrieve a list B
it is copied from the client
to the server
570 An email contains a textual Multipart/digest Multipart/alternative Multipart/mixed Multipart/paral D
birthday greeting, a picture lel
of a cake, and a song. The
order is not important.
What is the content-type?
571 During an FTP session the Exactly once Exactly twice As many times as All the above C
data connection is opened necessary
_______
572 Which of the following is a HTTP FTP TELNET All the above D
retrieval method?
573 A request message always A status line, a A status line and a header A header and a A request line D
contains _______ header, and a body and a header
body
574 Which of the following is URL Status code HTTP version Status phrase C
present in both a request number
line and a status line?
575 Which of the following is FTP HTTP HTML TELNET C
not a client program in
WWW?
576 A user wants to replace a PUT GET POST COPY A
document with a newer
version; the request line
contains the _______
method
577 The _______ header can Request Response General Entity A
specify the client
configuration and the
client's preferred document
format
578 The _______ tags enclose Executable Image List Hyperlink A
binary code or byte code contents
579 Which type of Web Dynamic Active Static All the above B
document is run at the
client site?
580 HTTP has similarities to both FTP; MTV FTP; URL FTP; SNMP FTP; SMTP D
Safi Khan | Virtual University of Pakistan
189 Computer Science MCQs for NTS / PPSC

_______ and _______


581 A user needs to send the OPTION POST PATCH MOVE B
server some information.
The request line method is
______
582 A response message always A header and a A status line, a header, and A request line and A status line C
contains _______ body a body a header and a header
583 The _______ header General Request Entity Response C
supplies information about
the body of a document
584 The _______ header can General Request Entity Response D
specify the server
configuration or provide
information about a request
585 Hypertext documents are TELNET Pointers DNS Homepages B
linked through _______
586 Which of the following is an CGI FTP HTTP HTML D
interpreter?
587 What are the components Controller, client Retrieval method, host Hypertext, All the above A
of a browser? program, computer, path name hypermedia, HTML
interpreter
588 A user needs to retrieve a GET HEAD POST PUT A
document from the server;
the request line contains the
_______ method
589 Which type of Web Dynamic Active Static All the above C
document is fixed-content
and is created and stored at
the server site?
590 The _______ of a Web page Attributes Tags Head Body C
contains the title and
parameters used by the
browser
591 Which type of Web Active Static Dynamic All the above C
document is created at the
server site only when
requested by a client?
592 In < IMG The head The body A tag An attribute D
SRC="Pictures/book1.gif"
ALIGN=middle> ALIGN is
_______
593 A user wants to copy a file PUT PATCH COPY POST C
to another location; the
request line contains the
_______ method
594 What does the URL need to Path name Host computer Retrieval method All the above D
access a document?
595 Which type of Web Active Static Dynamic All the above A
document is transported
from the server to the client
in binary form?
596 An ending tag is usually of C
the form _______
Safi Khan | Virtual University of Pakistan
190 Computer Science MCQs for NTS / PPSC

597 An applet is a small Shell script Java C C++ B


application program written
in _______
598 Stock quotations are posted Passive Dynamic Active Static B
on the Web. This is probably
a(n) _______ document
599 Updates for a satellite's Passive Dynamic Active Static B
coordinates can be obtained
on the WWW. This is
probably a(n) _______
document
600 A user needs to move a file PATCH MOVE PUT GET B
to another location. The
request line method is
_______
601 Which category of HTML Image Hyperlink List Executable C
tags allows the listing of contents
documents?
602 A program can use _______ Bourne shell Perl C Any of the D
to write a CGI program script above
603 An unemployed actor has Passive Dynamic Active Static D
posted his resume on the
Web. This is probably a(n)
_______ document
604 The server receives input An attribute A form A tag Any of the B
from a browser through above
_______
605 Output from a CGI program Text Graphics Binary data Any of the D
is _______ above
606 _______ is used to enable CGI Java HTML All the above C
the use of active documents
607 Java is _______ A programming A run-time environment A class library All the above D
language
608 An applet is _______ An active A passive A static A dynamic A
document application
program
609 In a real-time video Unicast Broadcast Multicast None of the C
conference, data from the above
server are _______ to the
client sites
610 A _______ adds signals from Mixer Translator Timestamp Sequence A
different sources to create a number
single signal
611 The RTCP _______ message Application- Source description Bye Farewell C
shuts down a stream specific
612 A standard that allows a SIP H.323 IEEE 802.3 V.90bis B
telephone (connected to a
public telephone network)
to talk to a computer
connected to the Internet is
_______
613 A _______ changes the Timestamp Sequence number Mixer Translator D
format of a high-bandwidth
Safi Khan | Virtual University of Pakistan
191 Computer Science MCQs for NTS / PPSC

video signal to a lower-


quality narrow-bandwidth
signal
614 An RTP packet is IP datagram RTCP packet UDP user datagram TCP segment C
encapsulated in a(n)
_______
615 The last step in JPEG, Blocking Compression Quantization Vectorization B
_______, removes
redundancies
616 A _______ shows when a Sequence Threshold Timestamp Playback buffer C
packet was produced number
relative to the first or
previous packet
617 _______ is a protocol to set H.245 H.225 H.323 Q.931 D
up and terminate a
connection between a
computer on the Internet
and a telephone (connected
to a public telephone
network)
618 TCP is not suitable for real- There is no There is no support for Missing packets are All the above D
time traffic because provision for multicasting retransmitted
_______ timestamping
619 JPEG encoding involves Quantization Vectorization Blocking The DCT D
_______, a process that
reveals the redundancies in
a block
620 The RTCP _______ report Sender QoS Receiver Passive C
informs the sender and
other receivers about the
quality of service
621 _______ is an application DCT SIP RTCP JPEG B
layer protocol that
establishes, maintains, and
terminates a multimedia
session
622 For streaming stored Jitter Alpha file Beta file Metafile D
audio/video, the _______
holds information about the
audio video file
623 _______ is a control TCP/IP RTSP HTTP SIP B
protocol that adds
functionalities to the
streaming process
624 The audio/video stream is Media player Browser Web server None of the A
sent by the media server to above
the _______
625 Voice over IP is a(n) Interactive Streaming stored Streaming live None of the A
________ audio/video above
application
626 _______ is a SIP message INVITE CANCEL OPTIONS All the above D
type
627 A _______ is involved in an Proxy server Registrar server Media server (a) and (b) D
Safi Khan | Virtual University of Pakistan
192 Computer Science MCQs for NTS / PPSC

SIP mechanism to find the IP


address of a callee
628 _______ are used to Translators Timestamps Playback buffers Sequence D
number the packets of a numbers
real-time transmission
629 In the _______ the CVF CSM ECB mode CBC mode C
encryption of each 8-byte
block is independent of the
others
630 In the public-key method of Encryption key Decryption key only Both None of the A
cryptography, which key is only above
publicly known?
631 A cipher is _______ An encryption A decryption algorithm A private key (a) or (b) D
algorithm
632 Before a message is Ciphertext Cryptotext Cryptonite Plaintext D
encrypted, it is called
_______
633 If 20 people need to 19 20 190 200 C
communicate using
symmetric-key
cryptography, _______
symmetric keys are needed
634 The _______ is an example P-box Vigenere cipher S-box Product block B
of polyalphabetic
substitution
635 In the symmetric-key Encryption key Decryption key only Both None of the D
method of cryptography, only above
which key is publicly
known?
636 The RSA algorithm uses a Private-key Symmetric-key Denominational Public-key D
_______ cryptography
method
637 The _______ is a block P-box S-box Product block All the above D
cipher
638 We use an cryptography Monoalphabetic Transposition Polyalphabetic None of the C
method in which the substitution substitution above
plaintext AAAAAA becomes
the ciphertext BCDEFG. This
is probably _______
639 One way to encrypt and ECB mode CBC mode CFM All the above D
decrypt long messages is
through the use of the
_______
640 An initialization vector is CSM CBC mode CVF (a) and (b) D
needed in the _______
641 In the public-key method of Public key Both keys Private key None of the C
cryptography, only the above
receiver has possession of
the _______
642 After a message is Ciphertext Cryptotext Cryptonite Plaintext D
decrypted, it is called
_______
643 We use a cryptography Polyalphabetic Transpositional Monoalphabetic None of the C
Safi Khan | Virtual University of Pakistan
193 Computer Science MCQs for NTS / PPSC

method in which the substitution substitution above


character Z always
substitutes for the character
G. This is probably _______
644 A protocol called _______ KDC X.509 CA level 1 Kerberos B
describes the certificate
issued by a CA in a structural
way
645 Windows 2000 uses an Otway-Rees Kerberos Diffie-Hellman Needham- B
authentication protocol Schroeder
called _______
646 In the digital signature His or her own His or her own private key His or her own The receiver's B
technique, the sender of the public key symmetric key private key
message uses _______ to
create ciphertext
647 A _______ is a trusted third TLS Firewall CA KDC D
party that solves the
problem of symmetric-key
distribution
648 In a _______ attack, a Return Replay Man-in-the-middle Bucket brigade B
message captured by an
intruder is illegally sent a
second time
649 In the _______ protocol, a Needham- Diffie-Hellman Otway-Rees Kerberos A
nonce is decremented by 1 Schroeder
so that an intruder cannot
send the exact same
message a second time
650 If user A wants to send an The network User A User B (a) or (b) C
encrypted message to user
B, the plaintext is encrypted
with the public key of
_______
651 When symmetric-key Skeleton Private Public Symmetric D
encryption is combined with
private-key encryption, the
_______ key is encrypted
with the public key
652 The _______ issues tickets Real server Data server AS TGS C
for the real server
653 In _______-key Private Certified Symmetric Public C
cryptography, everyone has
access to all the public keys
654 In the digital signature The sender's Her or his own symmetric Her or his own Her or his own A
technique, the receiver of public key key private key public key
the message uses _______
to create plaintext
655 A _______ is a large number Ticket Realm Nonce Public key C
used only once that helps
distinguish a fresh
authentication request from
a repeated one
656 A _______ certifies the KDC TLS CA Firewall C
Safi Khan | Virtual University of Pakistan
194 Computer Science MCQs for NTS / PPSC

binding between a public


key and its owner
657 In an authentication using 10 20 45 90 C
symmetric keys, if 10 people
need to communicate, we
need _______ keys
658 In the _______ protocol, the Needham- Otway-Rees Diffie-Hellman Kerberos C
xy
symmetric key is K = G Schroeder
mod N, where G and N are
public numbers
659 In a _______ attack, an Bucket-in-the- Replay Return Man-in-the- D
intruder comes between middle middle
two communicating parties
intercepting and replying to
their messages
660 A _______ is a trusted third PKI TGS KDC CA C
party that establishes a
symmetric key between two
parties who wish to
communicate
661 _______ is an Needham- Diffie-Hellman Otway-Rees Kerberos D
authentication protocol that Schroeder
needs an authentication
server and a ticket granting
server
662 The _______ is the KDC in Real server Data server AS TGS C
the Kerberos protocol
663 The _______ field in the Authentication SPI Padding Sequence B
authentication header and data number
the ESP header define the
security method used in
creating the authentication
data
664 Tunneling is a technique in Encapsulated in Encrypted; encapsulated in Authenticated; Encrypted; B
which the IP datagram is another another datagram encrypted authenticated
first _______ and then datagram;
_______ encrypted
665 _______ is an IP layer PGP ESP IPSec AH D
security protocol that only
provides integrity and
authentication
666 An _______ is a private Internet Intranet internet Extranet B
network with no external
access that uses the TCP/IP
suite
667 IPSec requires a logical PGP TLS AH SA D
connection between two
hosts using a signaling
protocol called _______
668 An _______ is a private Intranet Extranet Internet internet B
network with limited
external access that uses
the TCP/IP suite
Safi Khan | Virtual University of Pakistan
195 Computer Science MCQs for NTS / PPSC

669 The handshake protocol and TLS CA KDC SSH A


data exchange protocol are
part of _______
670 _______ is a collection of TLS SSH IPSec PGP C
protocols that provide
security at the IP layer level
671 A method to provide for the TLS PGP SA IPSec B
secure transport of email is
called _______
672 A VPN uses _______ to IPSec Tunneling Both (a) and (b) None of the C
guarantee privacy above
673 A _______ can forward or Message digest Proxy firewall Packet-filter Private key B
block messages based on firewall
the information in the
message itself
674 _______ is an IP layer AH PGP IPSec ESP D
security protocol that
provides privacy as well as
integrity and authentication
675 _______ is a transport layer PGP IPSec TLS AH C
security protocol
676 An IP datagram carries an Protocol Security parameter index Sequence number Next-header A
authentication header if the
_______ field of the IP
header has a value of 51
677 A _______ network is totally Private Hybrid Virtual private Any of the A
isolated from the global above
Internet
678 A _______ network can use Private Hybrid Virtual private Any of the B
a leased line for above
intraorganization
communication and the
Internet for
interorganization
communication
679 In a VPN, _______ The inner Neither the inner nor the The outer Both inner and D
encrypted datagram is outer datagram is datagram is outer
datagrams are
680 A _______ can forward or Proxy firewall Message digest Packet-filter Private key C
block packets based on the firewall
information in the network
layer and transport layer
headers

Safi Khan | Virtual University of Pakistan


196 Computer Science MCQs for NTS / PPSC

CS607-Artificial Intelligence
ID Qus A B C D Ans
1 We can get optimal solution True False NA NA A
given some parameters using
Genetic Algorithm
2 ___________ reasoning is Deductive Abductive Analogical Inductive D
based on forming, or inducing
a generalization from a
limited set of observations
3 ______ is the process of Representation Execution Reasoning Planning C
deriving logical conclusions
from given facts
4 Identify the correct step used Feasiblity study Problem Scope study Rapid prototyping A
to start designe of an expert recognization
system
6 If the antecedent is only Intrinsic Implication Boolean None of the given B
partially true, then the output
fuzzy set is truncated
according to the _________
method
7 Choose the fields in which automatic control data decision analysis All of the given D
Fuzzy inference systems have classification
been successfully applied
8 Usually a _________ graph is Triangular Circular Conical None of the given A
chosen to represent a fuzzy
set
9 Fuzzy logic is actually a True False NA NA A
superset of conventional
boolean logic
11 A classical set is a container, True False NA NA A
which wholly includes or
wholly excludes any given
element
12 The degree of truth that we Membership Ordinary Fuzzy Inline A
have been talking about is
specifically driven out by a
function called the
___________ function
13 The tractable problems are Non-structured Complex Simple None of the given B
further divided into
structured and ________
problems
14 If the antecedent is only Intrinsic Implication Both a and b None of the given B
partially true, then the output
fuzzy set is truncated
according to the _________
method
15 MSE stands for ___________ Mean Square Error Mean Standard Mean Square None of the given A
Error Entry
16 Any statement can be ? fuzzy
17 IF name is "Bob" AND Recommendation Directive Rule Relation Rule None of the given B
weather is cold THEN tell Bob Rule options

Safi Khan | Virtual University of Pakistan


197 Computer Science MCQs for NTS / PPSC

"Wear a coat" The above rule


is an example of _________
18 Which of the following is a IF x > 3 IF name is IF weather is All of the given D
valid example which Bob cold options
represents a suitable
antecedent in a rule?
19 Expert system technique Network Knowledge Data mining Backward Forward chaining C
where a hypothesis is given chaining
at the beginning and the
inference engine proceeds to
ask the user questions about
selected facts until the
hypothesis is either
confirmed or denied
20 IF A THEN B This can be A -> B A <-> B A <- B None of the given A
considered to have a similar
logical meaning as the
following
21 In general, the antecedent of True False NA NA A
a rule compares an object
with a possible value, using
an operator
22 A rule may have more than Antecedent Consequent NA NA B
one _________, which
usually suggests that there
are multiple actions to be
taken
23 Identify the correct clips> (facts 1 10) clips> (facts 1 to clips> (facts 10) clips> (facts 1) A
statement to list facts 10)
numbers 1 through 10
24 A rule, which takes a set of Recommendation Directive Rule Relation Rule None of the given B
inputs and gives advice as a Rule options
result, is called
25 In the statement IF A THEN Antecedent Consequent NA NA B
B, B is called
26 _________ usually takes the Antecedent Consequent NA NA B
form of an action or a
conclusion
27 Rule, which may have a Meta rule Conflict Forward chain None of the given C
priority in expert systems, is resolution rule rule options
called
28 Expert systems are an Cognitive science Computer Robotics Natural interface A
application in what area of science applications
artificial intelligence?
29 Expert system can be It provides tools for The set of Used for finding Intelligent technique D
expressed as the management, business the optimal for capturing tacit
delivery, tracking, processes, solution for a knowledge in a very
and assessment of culture, and specific problem specific and limited
various types of behavior by examining a domain of human
employee learning required to very large expertise, this
and training obtain value number or knowledge is
from possible converted to rules
investments in solutions for that can be used
Safi Khan | Virtual University of Pakistan
198 Computer Science MCQs for NTS / PPSC

information that problem throughout the


systems entire organization
30 ____________ are able to Meta rules Conflict Forward chain None of the given D
override the normal rules in resolution rules rules options
expert systems
31 IF temperature is below 0 Recommendations Directives Relations None of the given C
THEN weather is cold The options
above rule is used to
represent _______
32 Clips command for adding CLIPS> (+ 3 4) CLIPS> (3 4 +) CLIPS> (3 4 )+ CLIPS> +(3 4 ) A
two numbers 3 and 4 is
33 Within an expert system, the Inference engine Knowledge Knowledge base None of the given C
______________ contains engineer options
facts about a specific subject
area and rules that express
the reasoning procedures of
an expert on the subject
34 Reasoning in backward Data-driven Rule-driven Intelligence- Goal-driven D
chaining is known as reasoning reasoning driven reasoning
reasoning
35 In a situation where more True False NA NA A
than one conclusion can be
deduced from a set of facts,
to decide
which rule to be fired we use
Conflict resolution
36 _____________ is caused due Internal External Paging MVT A
to un-used space in fixed size fragmentation fragmentation
blocks/ pages
37 Addresses generated relative Relocatable Virtual Symbolic Physical A
to part of program, not to
start of physical memory are
38 If the system can allocate Safe Un-Safe Mutual Starvation A
resources to each process in
some order and still avoid a
deadlock then it is said to be
in ___________ state
39 A database of rules is also True False NA NA A
called a knowledge base
40 In the statement IF A THEN Antecedent Consequent NA NA A
B, A is called
41 ____________ is the part of A knowledge base A database of An interpreter, None of the given C
the system that controls the facts or inference
process of deriving engine
conclusions
42 An alternative method is the Longest rule Shortest rule Complex rule Forward chain rule D
longest-matching strategy.
This method involves firing
the conclusion that was
derived from the
___________
43 In some cases, the rules Recommendation Directives Relation None of the given B
provide more definite actions options
Safi Khan | Virtual University of Pakistan
199 Computer Science MCQs for NTS / PPSC

such as move left or close


door, in which case the rules
are being used to represent
_________
44 Using deduction to reach a Forward chaining Backward NA NA A
conclusion from a set of chaining
antecedents is called
45 Decision trees give us OR AND XOR None of the given A
disjunctions of conjunctions,
that is, they have the form: (A
AND B) _______ (C AND D)
46 Hypothesis space uses the Conjunctions (AND) Disjunctions Negation (NOR) None of the given A
________________ of the (OR)
attributes
47 Measure of the effectiveness Information Gain Measure Gain Information None of the given A
of an attribute in classifying Goal
the training data is called
48 Which one is NOT the Excellent for pattern Excellent Handles noisy None of the given D
advantage of Neural Network recognition classifiers data well
49 The first step of FIND-S is to H I J K A
initialize h to the most
specific hypothesis in
__________: h = < , >
50 A drawback of FIND-S is that, True False NA NA A
it assumes the consistency
within the training set
51 In all calculations involving 0 log 0, 0 0 log 10, 1 0 log 0, 1 1 log 1, 1 A
Entropy we define _________
to be ______
52 The soma and the enclosed True False NA NA B
nucleus in neuron play a
significant role in the
processing of incoming and
outgoing data
53 A concept is the Solution Problem Knowledge None of the given B
representation of the
__________ with respect to
the given attributes
54 If there are multiple part to Operator Rules Condition None of given A
the antecedent, apply fuzzy
logic______________ and
resolve the antecedent to a
single number between 0 and
1
55 If the true output of a True False NA NA A
concept [c(xi)] is 1 or 0 for an
instance, then the output by
our hypothesis [h(xi)] is 1 or 0
as well, respectively
56 Hypothesis space uses the Conjunctions (AND) Disjunctions Negation (NOR) None of the given A
_______ of the attributes (OR)
57 Machine learning typically Two Three Four Five B
follows__________phases
Safi Khan | Virtual University of Pakistan
200 Computer Science MCQs for NTS / PPSC

according to Finaly
58 The first step of FIND-S is to H I J K A
initialize h to the most
specific hypothesis in
__________: h = < , >
59 Mamdanis method was Control system Expet system Decision None of given A
among the irst analysis system
__________built using fuzzy
set theory
60 In theoretical computer Tractable and Intractable and Tractable and None of given A
science there are two mail intactable induction induction
branches of problem
61 In candidate-elimination G and S G and F And F H and S A
algorithm version spaces is
represented by two sets
named
62 In Anns. MSE is known as Most sequared Error Mean squared Medium None of given B
error squared error
63 The entropy is 1 when the Equal Greater Less None of given A
collection contains number of
positive example
___________to/than
negative example
64 The multilayer perceptions Network Layers Icon None of given A
are the most basic artificial
neural________
65 Which is the advantage of the The power of ANNs Less defined Knowledge is None of given C
neural network lie in their parallel rules to build a implicit
architecture neural network
for the specific
problem
66 Identify the correct definition A linear sequence of A non A non linear A linear sequence of D
of linear model given below steps is applied sequential sequence of steps is applied
repeatedly in an sequence of steps is applied repeatedly in an
iterative fashion to steps is applied repeatedly in an iterative fashion to
develop the repeatedly in an iterative fashion develop the Expert
software models iterative fashion to develop the Systems
to develop the expert systems
expert systems
67 The tractable problems are Non-structured Complex Simple None of the given B
further divided into
structured and ________
problems
68 Complex problems usually True False NA NA B
have well-defined steps
69 Fuzzy logic is a subset of True False NA NA B
conventional (Boolean) logic
70 Many machine learning True False NA NA A
systems are classifiers
72 In Fuzzy Inputs we resolve all 1 2 3 4 A
fuzzy statements in the
antecedent to a degree of
membership between 0 and
Safi Khan | Virtual University of Pakistan
201 Computer Science MCQs for NTS / PPSC

_____
73 Identify the step involved in Knowledge Coding Resource Identify concrete C
planning phase acquisition from allocation knowledge
expert elements
74 Which statement about Learning is Learning Learning is None of the given D
learning is NOT true constructing or denotes making useful
modifying changes in a changes in our
representations of system that minds
what is being enables a
experienced system to do
the same task
more efficiently
the next time
75 Inductive learning is based on True False Ambiguous None of the given A
the knowledge that if
something happens a lot it is
likely to be generally
_________
76 _________ logic lets us Fuzzy Classical Boolean None of the given A
define more realistically the
true functions that define
real world scenarios
77 Identify the correct step used Feasibility study Problem Scope study Rapid prototyping A
to start design of an expert recognization
system
78 Aggregation only occurs once True False NA NA B
for each output variable, just
after the fifth and final step,
defuzzification
79 Machine learning is a True False NA NA A
prerequisite for any mature
program of artificial
intelligence
80 _________ is the process of FIZ FIS FOS None of the given B
formulating the mapping
from a given input to an
output using Fuzzy logic
81 The degree of truth that we Membership Ordinary Fuzzy Inline A
have been talking about is
specifically driven out by a
function called the
___________ function
82 Which one is NOT the phase Training Application Validation None of the given D
of machine learning
83 __________ is the process by Aggregation Fuzzification Implication None of the given A
which the fuzzy sets that
represents the outputs of
each rule are combined into a
single fuzzy set
84 Reasoning in fuzzy logic is just Boolean Complex Coagnitive Supervised A
a matter of generalizing the
familiar _________ logic
85 Identify the sets in which Crisp set Classical set Fuzzy set non of the above C
Safi Khan | Virtual University of Pakistan
202 Computer Science MCQs for NTS / PPSC

Membership Function is used


86 The role of tester is often True False NA NA A
called the critic
87 If the antecedent is only Intrinsic Implication Boolean None of the given B
partially true, then the output
fuzzy set is truncated
according to the_________
method
88 General stages of ESDLC Spiral model Linear model Beta system Design coding C
includes
89 Identify the statement which Fuzzy sets, unlike Fuzzy sets, like Fuzzy sets, Fuzzy sets, unlike D
best defines the fuzzy sets classical sets, restrict classical sets, unlike classical classical sets, do not
themselves to restrict sets, do not restrict themselves
something lying themselves to restrict to something lying
wholly in either set something lying themselves to wholly in either set
A or in set not-A wholly in either something lying A or in set not-A
set A or in set wholly in either
not-A set A or in set A
90 _____________ learning Deductive Inductive Application None of given A
works on existing facts and
knowledge and deduces new
knowledge from the old
91 Inductive learning takes Existing Inductive Deductive None of given A
examples and generalizes
rather than starting with
__________knowledge
92 Identify which statement A classical set is a A classical set is A classical set is A classical set is a D
defines classical sets in a best container, which a container, a container, container, which
way wholly includes but which does not which wholly includes or
not wholly excludes wholly includes sometimes wholly excludes any
any given element or wholly wholly includes given element
excludes any or wholly
given element excludes any
given element
93 Fuzzy inference systems (FIS) True False NA NA B
are NOT associated with a
number of names
94 A concept is the Solution Problem Knowledge None of the given B
representation of the
__________ with respect to
the given attributes
95 Fuzzy inference systems (FIS) True False NA NA A
have multidisciplinary nature
96 In GA, the random process is Higher Lower Fitness Logical C
repeated until an individual
with required _________
level is found
97 Mutation can be as simple as True False NA NA A
just flipping a bit at random
or any number of bits
98 Genetic algorithm uses True False NA NA A
evolutionary techniques,
based on function
Safi Khan | Virtual University of Pakistan
203 Computer Science MCQs for NTS / PPSC

optimization and artificial


intelligence, to develop a
solution
99 A proposition is the Equation Action Theorem Fact D
statement of a ________
100 An AI system has a Planning Perception Learning Execution B
____________ component
that allows the system to get
information from its
environment
101 A function by which we can Alternative function Recursive Best function Fitness function D
tell which board position is function
nearer to our goal is called
102 Semantic networks are distance, objects, relationships, objects, D
graphs, with nodes relationships distance distance relationships
representing ____________
and arcs representing
____________ between
objects
103 In the worst case of semantic Does not exist Exists Is incorrect Is correct A
network, we may need to
traverse the entire network
and then discover that the
requested info ________
104 A statement in conjunctive ANDs of Ors ANDs Ors Ors of ANDs A
normal form (CNF) consists of
__________
105 An AI system must form a Representation Execution Learning Planning A
meaningful and useful
_____________ of the
internal information
106 __________ is the process of Representation Execution Reasoning Planning C
deriving logical conclusions
from given facts
107 What is the correct order for I,II,III I,III,II II,I,III II,III,I D
solving a problem using GA I.
Choose the best individuals
from the population for
crossover II. Choose initial
population III. Evaluate the
fitness of each individual
108 Mamdani's method was Control Systems Expert Systems Decision None of the given A
among the first analysis Systems
_____________ built using
fuzzy set theory
109 Outputs of learning are Application Validation Training None of the given A
determined by the
___________
110 Artificial Neural Networks is a Chemistry Physics Biology Mathematics C
new learning paradigm which
takes its roots from
_________ inspired approach
to learning
Safi Khan | Virtual University of Pakistan
204 Computer Science MCQs for NTS / PPSC

111 In ANNs, MSE is known as Most Squared Error Mean Squared Medium None of the given B
Error Squared Error
112 The input of the aggregation Truncation Implication Aggregation None of the given B
process is the list of
truncated output functions
returned by the _________
process for each rule
113 Decision trees give us OR AND XOR None of the given A
disjunctions of conjunctions,
that is, they have the form: (A
AND B) _______ (C AND D)
114 Identify the correct step used Feasibility study Problem Scope study Rapid prototyping B
to start design of an expert recognition
system
115 The goal of knowledge True False NA NA B
analysis is to analyze and
structure the knowledge
gained during the planning
phase
116 Fuzzy inference system is True False NA NA B
NOT associated with number
of names
117 Most of the solution spaces Graph Table Demo None of the given A
for problems can be
represented in a ________
118 In Depth First Search the Minimum Maximum Zero Both maximum and B
node with the largest value of minimum
height will be at the _______
priority to be picked
119 Can we precisely define True False NA NA B
Artificial Intelligence?
120 Ability to tackle ambiguous Intelligence Non Intelligence All of the given None of the given A
and fuzzy problems behavior
demonstrate
121 In Adversarial search there Adversaries Friends Players Intruders A
may occur such a scenario
where two opponents also
called ___________ are
searching for a goal
122 Some essential components Complex state Initial state Intermediate Goal state D
of problem solving are state
Problem Statement,
_________, Solution Space
and Operators
123 That is own thoughts as they Introspection Psychological Introspection None of the given A
go by expressions and
psychological
expression
124 Best first search is a greedy True False NA NA A
approach
125 Procedures that search the Time Space Time and space All of the given D
solution space in an both
uninformed manner are
Safi Khan | Virtual University of Pakistan
205 Computer Science MCQs for NTS / PPSC

usually costly with respect to


___________
126 We use graphs to represent True False NA NA A
problems and their solution
spaces
127 From discipline of Mathematics Biology Computer Psychology B
_____________ we have science
information about the
network structure of a
human brain and all the
theories on functionalities of
different human organs
128 Which of the following Linguistic Philosophy Biology Psychology A
disciplines provides us with
the theories of structure and
meaning of language
129 The traveling inside a solution Operands Inner solution Space solution Operators D
space requires something
called as ___________
130 AI actually tries to recreate Weak Strong Weak and None of the given B
the functions of the inside of strong
the brain as opposed to
simply emulating behavior
131 ______ AI treats the brain as Weak Strong Weak and None of the given A
a black box and just emulates strong
its functionality
132 Answering the Sequence Intelligence Ability to make Ability to None of the given A
Problem need plan schedule
133 In fuzzy inputs we resolve all 1 2 3 4 A
fuzzy statements in the
antecedent to a degree of
membership between 0 and
______
134 Identify the steps involving in Knowledge Coding Resource Identify concrete C
planning phase acquisition from allocation knowledge element
expert
135 Identify the sets in which Crisp set Classical set Fuzzy set None of the above C
membership function is used
136 Choose the field in which Automatic control Data Decision All of the given D
fuzzy inference system is classification analysis
successfully applied
137 If the antecedent is only Intrinsic Implication Boolean None of the given B
partially true,then the output
fuzzy set is truncated
according to the _________
method
138 Identify which statement A classical set is A classical set is Classical sets, None of the given C
defines classical set in a best container, which container, either wholly
way includes but not which does not include
wholly excludes any wholly include something or
given element or wholly exclude it from
excludes any the membership
given element of a set
Safi Khan | Virtual University of Pakistan
206 Computer Science MCQs for NTS / PPSC

139 By getting grips on Pseudo code Algorithms Charts Graphs B


___________ that deal with
searching techniques in
graphs and trees, problem
solving can be performed in
an efficient manner
140 Every graph can be converted True False NA NA A
into a tree
141 In Breadth First Search the Maximum Minimum Zero None of the given A
node with the largest value of
height will be at the
_________ priority to be
picked
142 Breadth-First Search checks True False NA NA A
all paths of a given length
before moving on to any
longer paths
143 There are _________ search 1 2 3 4 D
strategy
144 Breadth-first search is a good Extremely small Small Medium Large B
idea when you are confident
that the branching factor is
_________
145 The foothill problem occurs High Secondary Primary Deep B
whenever there
are___________ peaks
146 The Plateau problem comes Separating Joining Over None of the given A
up when there is a mostly flat
area ___________ the peaks
147 Which one of the problem is Foothill problem Plateau Ridge Box C
more subtle, and
consequently, is more
frustrating
148 The paths found by best-first Shorter Longer Same None od the given A
search are likely to be
__________ than those
found with other methods
149 In Basic Genetic Algorithm Number Change Operator Operand B
the term mutation refers to a
small random ________
150 Which of the following two i & iii ii & iii iii & iv i & ii D
components are closely
coupled and each is
Intrinsically tied to the other.
i. Knowledge representation.
ii. Reasoning. iii. Execution. iv.
Planning
151 An ___________ is A Expert system Intelligent Echo System Energy System A
computer program designed System
to model the problem solving
ability of a human expert."
152 Another expert system R1/XCON MYCIN Dendral R3/XCON A
named __________ was
Safi Khan | Virtual University of Pakistan
207 Computer Science MCQs for NTS / PPSC

developed by Digital
Equipment Corporation, as a
computer configuration
assistant
153 An expert system may True False NA NA A
replace the expert or assist
the expert
154 Conventional programming Solution, Problem Problem, Problem, Expert Solution, Expert A
focuses on _______, while ES Solution
programming focuses on
________
155 In backward chaining Proof Goal Plan None of the given B
terminology, the hypothesis
to prove is called the
________
156 The branch of computer Luger and Winston Schalkoff Bellman A
science that is concerned Stubblefield
with the automation of
intelligent behavior this
definition is from:
157 In Artificial Intelligence GA True False NA NA A
stands for Genetic Algorithms
158 ________ is based on Inductive reasoning Deductive Analogical Common-sense A
forming, or inducing a reasoning reasoning reasoning
generalization from a
limited set of observations
159 A computer program Expert System Domain expert Expert domain None of the given A
designed to model the
problem solving ability of a
human expert is known as
___________
160 A__________is A person Expert System Domain expert Expert domain None of the given B
who posses the skill and
knowledge to solve a specific
problem in a manner superior
to others
161 Hill Climbing is basically a Depth first search Breadth first Both a & b None of the given A
_____________ with a search
measure of quality that is
assigned to each node in the
tree
162 An equipment calibration Decision Maintenance / Process Diagnostic D
expert system is an example management scheduling monitoring /troubleshooting
of an expert system in the /control
application category of
163 All managers of a company, True False NA NA B
no matter what level, have
the same type of information
needs
164 The rule that define how Meta rule Conflict Forward chain None of the given B
conflict resolution will be resolution rule rule option
used, and how other aspects
of the system itself run, are
Safi Khan | Virtual University of Pakistan
208 Computer Science MCQs for NTS / PPSC

called
165 In some cases, the rules Recommendations Directives Relations None of the given C
provide definite actions such option
as move left or close door, in
which case the rules are
being used to represent
__________
166 A database of rules is also True False NA NA A
called knowledge base
168 In theoretical computer Tractable and Intractable and Tractable and None of the given A
science there are two main Intractable Induction Induction
branches of problems
169 For better web hunter Syntactic Conceptual Semantic All of these D
search; we should use the
search on _________ basis
170 Which parameters should be Target & Starting Search method Time Constraint All of these D
defined for the Web point
Hunter___________
171 Web Hunter design consists Initialization Perception Action & Effect All of these D
of______________
172 An agent is anything that can Sensors , Effectors Effectors , Perceptionor , Effectors , A
be viewed as perceiving its Sensors Effectors Perceptionor
environment through
___________ and acting
upon that environment
through ___________
173 Search algorithms used in Uninformed and Blind and Informed and Any path and non- A
web hunter is__________ informed uninformed Heuristic optimal
174 The number of directories Storage capacity Content Both of these None of the given C
and files is limited only by availability
________________
175 The data structures used in Location Visited Target File and None of the given A
web hunting contains directories
information of ___________
176 To quickly retrieve specific URL Seed Both of these None of the given A
location of the web page;
data structure node should
use __________
177 Progressive deepening DFS BFS Both of these None of the given B
guarantees to find the
solution at a minimum depth
like __________
178 In Adversarial search the Contrary Same Both of these None of the given A
goals of the adversaries are
usually ________to each
other
179 To infer new information True False NA NA A
from semantic networks, we
can ask questions from nodes
180 Which one is not the Diagnosis Prescription Interpretation None D
application area of expert
system?
181 An expert system is different Separate Defined Together Common A
Safi Khan | Virtual University of Pakistan
209 Computer Science MCQs for NTS / PPSC

from conventional programs


in the sense that program
control and knowledge are
_______
182 Which one of the following is The domain expert The knowledge The end user All of the given D
involved in an ES engineer
development project
183 Semantic networks are Run time Compile Time Start Time End Time A
computationally expensive at
________
184 Searching is a formal Alternatives Recursive Best Fitness A
mechanism to explore
185 Genetic Algorithms is a Series Parallel Sequential None of the give B
search method in which
multiple search paths are
followed in _______
186 In optimal path searches we Worst Least Least but not Best D
try to find the ____________ worst
solution
187 Hit and trial is classical Trivial Medium Least None of the give A
approach to solve the
________ problem easily
188 We use graph to represent True False NA NA A
problems and their solution
spaces

Safi Khan | Virtual University of Pakistan


210 Computer Science MCQs for NTS / PPSC

CS609-System Programming
ID Qus A B C D Ans
1 Usually interrupt True False NA NA A
procedures are reentrant
procedures especially those
interrupt procedure
compiled using C language
compiler are reentrant
2 Standard PC operates in two Real mode and Base mode and None of the given Real mode and D
modes in terms of memory Extended Mode Memory Mode protected
which are mode
3 UART stands for_______ Universal Universal Unconventional None of these A
Asynchronous Adjustment and Assisted Recovery
Receiver Transmitter Realigning Tool Team
4 DMA stands for_________ Direct Memory Distinct Memory Direct Module Access Direct Memory A
Access Access Allocation
5 DTE is _______ Data terminal Data Dual terminal None of the A
equipment transmitting equipment given
equipment
6 Interrupt Vector Table (IVT) 1024 2048 3072 4096 A
in short is a _______ bytes
sized table
7 Hardware Interrupts are Preemptive Non-Preemptive Both Preemptive and None of Given B
________ Non-Preemptive
8 Timer interrupt is a Hardware Interrupt Software Both of these None of These A
________ Interrupt
9 Int 14H __________ can be Service # 0 Service # 1 Service # 2 None of the A
used to set the line given options
parameter of the UART or
COM port
10 The keyboard makes use of 9 10 11 12 A
interrupt number _______
for its input operations
11 In self test mode the output True False NA NA A
of the UART is routed to its
input
12 In case of synchronous True False NA NA A
communication a timing
signal is required to identify
the start and end of a bit
13 Register can be used to Counter Register Accumulator Both of these None of these A
divide frequency is Register
________
14 Only ________ ports are 70 and 71H 71 and 72H 70 and 72H 72 and 73H A
important from
programming point of view
15 Which port is known as 60H 61H 64H 69H A
Data Port______
16 LPTs can be swapped True False NA NA A
17 PPI is used to perform True False NA NA A
parallel communication
18 __________is used to Int 16H Int 17H Int 18H Int 19H B
Safi Khan | Virtual University of Pakistan
211 Computer Science MCQs for NTS / PPSC

control the printer via the


BIOS
19 _____ bit is cleared to D1 D2 D3 D4 D
indicate the low nibble is
being sent
20 DSR stands for ________ Data set ready Data service Data stock ready None of the A
ready given
21 There are two main types of PC based and Hardware based Hardware interrupts None of the C
interrupts namely Window based and Kernal and Software given
___________ based interrupts
22 To set the interrupt vector True False NA NA A
means is to change the
double word sized interrupt
vector within the IVT
23 The service number is AL CL AH AX C
usually placed in the
________ register
25 The service _________ is 15H/2FH 15H/4FH 15H/FFH 15H/5FH B
called the keyboard hook
service
26 The BIOS interrupt 1AH 2AH 3AH 4AH A
________ can be used to
configure RTC
27 The interval timer can Five Seven Four Six D
operate in _______ modes
28 ______ is Disk interrupt 10H 11H 13H 14H C
29 PPI stands for Parallel Peripheral Port Programmable None of the B
Programmable Programmable interface given
interface interface
30 Int ________ is used to 17H 18H 20H 21H A
control the printer via the
BIOS
31 Counter register can be True False NA NA A
used to divide clock signal
32 DCE stands for ________ Data communication Distributed Data Data Carrier A
equipment Computing Communications Equipment
Environment Equipment
33 _______ is used to identify Interrupt ID Register PC Register AC Register None of All A
the cause of interrupt These
34 The bit number _______ of 6 7 8 9 B
the coprocessor control
word is the interrupt enable
flag
35 There are __________ kinds 2 3 4 5 A
of serial communication
36 ________ store the base 40:00H 40:02H 40:08H 40:1AH C
address for LPT1
37 The amount of memory 15H/88H 16H/88H 17H/88H 21H/88H A
above conventional
memory (extended
memory) can be
determined using the

Safi Khan | Virtual University of Pakistan


212 Computer Science MCQs for NTS / PPSC

service _______
38 The output on the monitor Video controller Bus controller Ram controller None of the A
is controlled by a controller given
called __________within
the PC
39 The keyboard input 60H 61H 62H 63H A
character scan code is
received at ________port
40 _______ is LED control byte 0xFD 0xED 0xFF 0xEE B
41 There are two main types of PC based and Hardware based Hardware interrupts None of the C
interrupts, namely Window based and Kernal and Software given
based interrupts
43 BPB stands for ________ BIOS parameter block BIOS processing Base processing block BIOS partition A
block block
44 The Function of I/O I/O control signals Buffering Error Correction and All of given D
controller is to provide Detection
__________
45 IVT is a table containing 2 3 8 16 B
______ byte entries each of
which is a far address of an
interrupt service routine
46 Each paragraph in keep 4 8 16 32 C
function is ____ bytes in
size
47 Interrupt 9 usually reads the ASCII code Scan code Both ASCII and Scan None of the B
_________ from keyboard code above
48 A software interrupt does True False NA NA A
not require EOI (End of
interrupt)
49 To store each character in 2 4 6 8 A
keyboard buffer ____ bytes
are required
50 Interrupt _____ is empty; 9H 13H 15H 65H D
we can use its vector as a
flag
51 Command register is an 4 8 16 32 B
_____ bit register
52 The interval timer can Three Four Five Six D
operate in ____modes
53 The following command Turn on the speaker Turn off the Toggle the speaker None of the A
outportb speaker above
(0x61,inportb(0x61) | 3);
will ________
54 The PPI acts as an interface I/O device CPU BUS None of Given A
between the CPU and a
parallel ________
58 Interrupt ______ is used to 0AH 1AH 2AH 3AH A
get or set the time
59 ______ is used to set time 1A/02H 1A/03H 1A/04H 1A/05H B
60 Communication between Asynchronous serial Synchronous Parallel None of the B
keyboard and keyboard serial communication given
controller is _________

Safi Khan | Virtual University of Pakistan


213 Computer Science MCQs for NTS / PPSC

61 Following is not a method of Programmed I/O Interrupt driven Hardware Based I/O None of given C
I/O I/O
63 Which of the following are BIOS (Basic I/O DOS ISR ISR provided by third All of the given D
types of ISR __________ service ) ISR party device drivers
64 Interrupt service number is CH CL AH AL C
usually placed in
____________ register
65 NMI Stand for _________ Non Maskable Non Multitude Non Maskable None of Given A
Interrupt Interrupt Instruction
66 A single interrupt controller 4 6 8 10 C
can arbitrate among ____
different devices
68 The microprocessor Reset,Hold,NMI,INTR NMI, INTR,NMI,Reset,Hold None of the A
package has many signals INTR,Hold,Reset Given
for data. Below are some in
Correct priority order
(Higher to Lower)
69 The following command Turn on the speaker Turn off the Toggle the speaker None of the A
outportb speaker given
(0x61,inportb(0x61) &
0xFC); will
70 BIOS DO NOT support LPT1 LPT2 LPT3 LPT4 D
______
71 _________ used to INT 10 H INT 11 H INT 12 H INT 13 H C
determine the amount of
conventional memory
interfaced with the
processor in kilobytes
72 The bit ______ of Line 1 3 5 7 D
control register in UART, if
cleared will indicate that
DLL is the data register
73 Bit number _______ of 7 8 9 10 A
coprocessor control word is
the Interrupt Enable Flag
74 To distinguish 486 with True False NA NA A
Pentium CPUID Test is used
75 The memory addresses of True False NA NA A
COM ports remain same for
all computers
77 Int_____________ service 0 14H 15H 13H None of the A
can be used to set the line given option
parameter of the UART or
COM port
78 BIOS support 2 3 4 6 C
_____________UARTS as
COM ports
79 The________ function uses recievebyte() initialize () receive() recievechar() D
the COM port number to
receive a byte from the
COM port using BIOS
services
80 Int 14H____________ can Service#0 Service#1 Service#2 None of the B
Safi Khan | Virtual University of Pakistan
214 Computer Science MCQs for NTS / PPSC

be used to send a byte given option


81 The ________function Initializecom() Initialize() Recievechar() None of these B
initialize the COM port option
whose number is passed as
parameter using BIOS
services
82 ____whenever received XON & XOFF XOFF & XON XON & YOFF YON & XOFF A
indicates the start of
communication and ______
whenever received
indicates a temporary pause
in the communication
83 In ____________each byte Synchronous Asynchronous Both None of given B
is needed to be communication communication
encapsulated in start and
end
84 ________ is a device Clock counter ROM Clock Real time clock D
incorporated into the PC to
update time even if the
computer is off
85 There are two type of True False NA NA B
communication
synchronous and Anti
Synchronous
86 The ____________ function STOn() SelfTest() SelfTestOn() Non of these C
simply enables the self test
facility within the modem
control register
87 REGS is a Union True False NA NA A
88 If CPUID instruction is not 486 processor 386 processor 286 processor All of the above A
present then the processor
can be a
89 On the execution of IRET 4 bytes 6 bytes 8 bytes 10 bytes C
instruction, number of bytes
popped from stack is
90 Keyboard Status Byte is 0040:0000H 0040:0013H 0040:0015H 0040:0017H D
located at the address
91 If we use keep (0, 1000) in a 64000 bytes 32000 bytes 16000 bytes 80000 bytes C
TSR program, the memory
allocated to it is
92 Maximum number of 64 128 256 512 C
interrupts in a standard PC
is
93 Total No. of bytes that can 16 32 64 128 B
be stored in Keyboard
Buffer is____
94 If printer is _____ then idle busy Out of paper None of the A
printer sends back the ACK given
signal to the printer
interface
95 The baud rate is set in True False NA NA A
accordance with the divisor
value loaded within the
Safi Khan | Virtual University of Pakistan
215 Computer Science MCQs for NTS / PPSC

UART internal registers base


+0 and base +1
96 Int 14H __________ can be Service # 0 Service # 1 Service # 2 None of the C
used to receive a byte given options
97 The BIOS interrupt 0x1AH True False NA NA A
can be used to configure
real time clock
98 _________ is used to read 1A\02H 1A\03H 1A\04H 1A\05H C
date from RTC
99 The _________ function Receivebyte (); Receive (); Receivechar (); None of the C
receive a byte and COM given option
port number is passed as
parameter using BIOS
service
100 __________ whenever XON\XOFF XOFF\XON XON\YOFF YON\XOFF A
receive indicates the start of
communication __________
whenever receive indicates
the end of communication
103 Software based flow control Xon XOFF Both None C
make use of _________
control characters
104 What will be the value of DL 0 1 2 3 D
register when we are
accessing C drive using
undocumented service
21H/32H?
105 Set the Interrupt vector True False NA NA A
means to change the double
word sized interrupt vector
within IVT
106 If keyboard buffer is empty True False NA NA A
the head and tail points at
the same location
107 Standard PC can have _____ 1 4 8 16 B
PPI
108 By cascading two DMAs 4 8 16 32 C
____ bits can be transferred
109 PPI interconnection D1 D2 D3 D4 D
_______ bits is cleared to
indicate low nibble is being
sent
110 File can be______ viewed as Physically Logically Both physically and None A
collection of clusters or logically
blocks
111 Operating system name 3 5 8 11 C
contains ____ bytes in boot
block
112 File system used in CDs Contiguous Chained Indexed None A
is_______ file system
113 ________means typematic 0xF3 0xF4 0xF5 0xF6 A
rate will be sent in next byte
114 To access the block within CHS LBA LSN None of the C
Safi Khan | Virtual University of Pakistan
216 Computer Science MCQs for NTS / PPSC

cluster using BIOS services given


the cluster number should
be converted into _____
115 Display device (Monitor) memory mapped Isolated Both of above None of these A
performs _________ I/O
116 Timer interrupt occurs 18.2 16.2 15.2 14.2 A
_______ times every second
by means of hardware
117 An I/O device cannot be True False NA NA A
directly connected to the
busses so controller is
placed between CPU and
I/O
118 Keyboard uses port ____ as 64H 66H 67H 69H A
status port
119 Tail of keyboard should get True False NA NA A
to get the start of buffer
120 Control information in files BPB DPB FCB FPB C
is maintained using
121 ____ No. of bytes are used 1 2 4 8 B
to store the character in the
keyboard buffer
122 The ______ service # is not 01 02 03 FF D
used in any interrupt
123 At IRQ 7 Interrupt # ___ is 0x0A 0x0B 0x0C 0x0F D
used
124 We have set the bit No. 7 of 0xf ,IRQ 7 0xa, IRQ 6 0x8, IRQ 5 0x6, IRQ 2 A
IMR(Interrupt Mask
Register) to unmask the
Interrupt so that interrupt
_____ can occur at ____ line
125 If we want to produce the high, 0x42 low, 0x22 high, 0x22 low, 0x42 D
grave voice from speaker
phone then we have to load
the ____ divisor values at
Port ____
126 In order to produce the 8, 0x21 16, 0x42 32, 0x22 64, 0x32 A
sound from PC internal
Speaker we have to load
the___bit divisor value at
the ___port
127 In counter register bit no. 3 1 2 4 16 D
changes its value between 0
and 1 with in ____clock
cycles
128 In keyboard status byte bit if (((*scr)&12)==12) if if (((*scr)&4)==4) if A
no. 2 and 3 are used for ctrl (((*scr)&8)==8) (((*scr)&2)==2)
and alt keys respectively.
Which of the following
condition is used to check
that Ctrl + Alt keys are
pressed. Where: unsigned
char far * scr = (unsigned
Safi Khan | Virtual University of Pakistan
217 Computer Science MCQs for NTS / PPSC

char far *)(0x00400017);


129 Bit # ___________ of Eflag 12 14 15 18 D
is used for alignment check
130 Each addressable unit has a Physical Logical Both None A
unique combination of sec#,
head #, track # as its
________ address
131 First cluster in user data is 0 1 2 3 C
numbered in a FAT based
system
132 BIOS services understand LBA LSN Cluster # None A
__________
133 The first cluster number of a BPB DPB FCB None C
file can be found in
_________
134 The size of FS Info block is 64byte 128 byte 256 byte 512 byte D
________
135 In NTFS first _________ 4 6 16 32 C
entries are reserved
136 In memory map of first 1 64kb 384kb 640kb None C
MB of ram ,the first -------- is
called conventional RAM
137 In memory map of first 1 64kb 384kb 640kb None B
MB of ram ,the higher
_________ is called system
memory
138 The ________ of boot block Code part Data part Both None B
constitutes of BPB
139 Extended BIOS function LBA CHS LSN None A
make use of _________
address
140 LBA address can be used in True False NA NA A
place of the CHS address
141 In FAT12, the maximum 0 ~ FEFH 1~ FEFH 2 ~ FEFH 3 ~ FEFH C
range of clusters is
_________
142 NTFS volume can be True False NA NA A
accessed directly in DOS
143 Each partition information 00AA 0055 050A AA55 D
chunk is 16 bytes long and
the last two bytes at the
end of the partition table
data part is the partition
table signature whose value
should be _______
indicating that the code part
contains valid executable
code
144 Service 21H/52H service 2-bytes 4-bytes 6-bytes 8-bytes B
returns the address of DOS
internal data structures in
ES: BX ________behind the
address returned lies the far
Safi Khan | Virtual University of Pakistan
218 Computer Science MCQs for NTS / PPSC

address of the first MCB in


memory
145 80386 can have 2 3 4 5 C
___________ control
registers
146 The partition table uses the 13H 14H 15H 16H A
extended _________
service
147 The entry point of execution Start of the first Start of the last Anywhere in the Can be in the C
in EXE File can be instruction instruction Program middle of the
program
148 Using the____ entry and the Reserved blocks Root Directory Number of FAT None of the B
FAT we can access the copies given
contents of file
149 Control information in files BPB DPB FCB FPB C
is maintained using
150 What will happen if NTFS Convert it to FAT Nothing will Error of invalid media None of the C
volume is accessed in DOS? volume happen given
151 LSN of FS Info block is BPB FAT Root Directory None of the B
available at given
152 DOS device drivers do not FAT12 FAT16 FAT32 NTFS D
understand the_____ data
structures
153 ________ is a collection of Cluster Sector Byte None of Given A
contagious blocks
154 Practically __________ 2^26 2^28 2^30 2^32 D
entries are there in FAT 32
155 The keyboard can perform asynchronous synchronous Multiple Single B
_______ serial I/O
156 Bit number 2 of port 64H True False NA NA B
Status register used for
output buffer full
157 Bit number _____ can 4 5 6 7 D
declares the parity error of
port 64H Status register
158 Bit number _____ of port 0 1 2 3 A
64H Status register used for
input buffer full
159 Maximum possible entries 1024 2048 4096 65536 C
in FAT12 are ________
160 Disadvantage of FAT32 is Large disk size can be Cluster size is Internal Very large table D
________ managed in FAT32 reduced fragmentation is
reduced
161 What will be the value of 0000H 1111H FFFFH None of the C
the word located at 1Fh in given.
DPB when number of free
clusters on drive is not
known?
162 Jump code part contains 3 5 8 11 A
____ bytes in boot block
163 File can be _______ viewed Physically Logically Both logically and None of the B
as organization of data physically give

Safi Khan | Virtual University of Pakistan


219 Computer Science MCQs for NTS / PPSC

164 _________ is used to read a absread() abswrite() lsnread() None of the A


block against its LSN given
165 When we talk about FAT 0 1 2 None of the C
based file system, in user given
data area first cluster
number is ______
166 Cluster number can also be True False NA NA B
referred as block number
167 The directory structure of Array Tree Linked list None of the B
DOS is like ________ given
168 Control information about BPB DPB FCB FPB C
files is maintained using
______
169 When LSN is equal to zero First block of the disk First block of the First block of hidden None of the B
(0), it means ________ logical drive blocks given
170 In FAT32, lower _______ 26 28 30 32 B
bits are used
171 _______ is relative address LBA LSN CHS None of the B
with respect to the start of given
Logical Drive
172 The practical limit of blocks 32 blocks per cluster 64 blocks per 128 blocks per 256 blocks per B
per cluster is _______ cluster cluster cluster
173 In dos we have limit of 128 blocks per 256 blocks per 32 blocks per cluster 64 blocks per A
_______ cluster cluster cluster
174 Highest capacity physical 127 GB 100 GB 80 GB 300 GB A
capacity of the disk
according to the IDE
interface is _________
175 Partition Table can be read 13 H 14 H 15 H None of given A
using the extended
____________ Services
176 In Protected Mode, the Descriptor Selector All of the given None of the B
segment registers are used choices given choices
as _________
177 To access drive parameter 09H/32H 11H/32H 17H/32H 21H/32H D
block we use
undocumented service
______
178 ________ is an absolute LBA LSN CHS None of the A
address relative to the start above
of physical drive
179 Boot block consists of 64 128 256 512 D
______ bytes
180 The DMA requests to HOLD ACR ACK None of Given A
acquire buses through the
________ signal
181 The keyboard device writes Input buffer is full Byte has been Output buffer is full None of the B
a code 0xFA on the port 60H received given
to indicate that the _______ properly
182 A single DMA can transfer 8-bits 16-bits 32-bits 12-bits A
______ operands to and
from memory in a single a

Safi Khan | Virtual University of Pakistan


220 Computer Science MCQs for NTS / PPSC

bus cycle
183 In FAT12, to calculate the 1/2 3/2 5/7 7/2 B
address or offset from
index, we need to multiply
it with _________
184 ________ Register can be DMA Command DMA Request DMA Mode Register DMA controller D
used to show that the register Register Register
channel is single transfer,
block transfer or demand
transfer mode
185 When we mark a file as E5 1 0 N C
deleted by placing 0xE5
then the chain of clusters in
FAT is also replaced by
______
186 Cluster size is reduced in FAT12 FAT16 FAT32 None of the C
________ given
187 In FAT32 __________ root 128 256 512 None of the D
directory entries are there given
188 If a file is having more than FAT BPB DPB None of the D
one cluster then it will be above
managed by ______
189 Internal fragmentation is FAT12 FAT16 FAT32 None of the B
reduced in _________ given
190 For supporting long file 12 20 26 32 D
names, _________
fragments can be supported
191 To store a cluster in FAT 32 Nibble Byte 2 Bytes 4 Bytes D
_____ is/are needed
192 If a file size is 12K and the 2 3 4 5 B
size of the cluster is 4K then
_____ clusters are used for
the file
193 We can access the contents Reserved Blocks Number of FAT File Allocation Table None of the C
of File by using the root copies (FAT) given
directory entry and _____
194 FAT based file system can ASCII UNICODE Both ASCII and None of the C
store file name in ________ UNICODE given
form
195 Drive parameter block is FCB FAT BPB CPB C
derived from _________
196 We can access Blocks for BPB DPB FCB Both BPB and C
FAT using ________ DPB
197 If we know the cluster True False NA NA A
number, we can access the
blocks within the cluster
using BIOS services directly
198 ________ is an internal data BPB DPB CPB None of the D
structure of DOS and given
resides in main memory
199 The size of DPB data 16 32 64 128 D
structure is _______ bytes

Safi Khan | Virtual University of Pakistan


221 Computer Science MCQs for NTS / PPSC

200 The size of FCB data 16 32 64 128 A


structure is _______ bytes
201 Advantages of FAT32 is/are Large disk size can be Cluster size is Internal All of the given B
________ managed in FAT32 reduced fragmentation is
reduced
202 ________ file system keeps FAT12 FAT16 FAT32 None of the C
the backup of its boot block given
203 To store a UNICODE Nibble Byte 2 Bytes 4 Bytes C
character ____ is/are
needed
204 ______ is the first block on LSN =0 LBA=0 LBA=1 Both LBA=0 B
disk and LSN=0
205 If FAT entry is between Cluster is available It is a Reserved It is next file cluster It is a last file B
FFF0H to FFF6H in FAT16 cluster cluster
then _______
206 File system used in CDs Contiguous Chained Indexed None A
is_______ file system
207 A file has 2 clusters and the 2K 8K 16K 32K B
size of cluster is 4K. What
will be the size of file?
208 In NTFS, Backup of boot 2 6 8 10 B
block is stored at block #
__________
209 The interval timer can Five Seven Four Six D
operate in _______ modes
210 File control block (FCB) is 32 64 16 128 A
__________ byte long
211 Extended memory is AT XT All of the given None of them A
available if the processor is choices
of the type ___________
212 The built in mechanism hamming code parity CRC16 (cyclic CRC32 (cyclic B
within the UART for error redundancy check 16 redundancy
detection is__________ bit ) check 32 bit )
213 If three Programmable 12 18 23 24 D
interrupt controllers are
cascaded then how many
interrupt driven hardware
IO devices can be attached
__________
214 DOS command ________ mem/d mem/e mem/m None of the A
which gives the status of given
the memory and also points
out which memory area
occupied by which process
215 Each entry in the IVT is 4-bytes 6-bytes 8-bytes 2-bytes A
________ in size
216 The tail value of the Start End Middle None of given A
keyboard buffer should be
examined to get to the
______ of the buffer
217 In parallel communication, 2-bits 4-bits 6-bits 8-bits D
the maximum numbers of
bits we can send between
Safi Khan | Virtual University of Pakistan
222 Computer Science MCQs for NTS / PPSC

two computers are


________
218 14h include __________ Service #0 Service #1 Service #2 Service #3 B
which is used to send a byte
219 The status register _____ is B A C D A
the main control register
220 In NTFS, up to ________ 30 48 255 510 C
characters are used to store
files names
221 A cluster is a collection of Blocks Sectors Bytes None of Given A
contiguous _______
222 In BPB, root directory is Cluster#0 Cluster#1 Cluster#2 Cluster#3 A
saved in _________
223 In NTFS, total sizes of MFT 16-bytes 20-bytes 26-bytes 32-bytes A
entries are _______
224 In NTFS, _______ store the Both small & large Small record Large Record None of given A
contents of file file Record
225 In NTFS, contents and Small record Large Record Both small & large None of given D
indexed of file is stored in file Record
_________
226 If we want to send printing Initialize printer Read Status Check Error All of the given D
on the printer then we have
to perform following steps
227 Int_________ service 0 can 13H 14H 15H None of the A
be used to set the line given option
parameter of the UART or
COM port
228 When LBA is equal to zero First block of the disk First block of the First block of the None of the A
(0), it means ________ logical drive hidden block given
229 In IRQ2 and IRQ3 which one Can't be determined Both have same IRQ3 IRQ2 D
has the highest priority? priority
230 Following is not a method of Programmed I/O Interrupt driven Hardware Based I/O None of given C
I/O I/O
231 It is possible to perform I/O True False NA NA A
operations from three
different methods
232 ___________ file system is Contiguous Chained Indexed Both None of the B
used in NTFS based systems given
233 In NTFS, boot sector is First and 6th sector First and Last Only at Last sector Only at First B
stored at sector sector
234 How many bytes can be 128 255 510 1024 B
used to store a file name in
NTFS?
235 ____ is the first logical DPB MFT Boot sector None C
sector of NTFS partition
236 In boot block BIOS 05H 08H 0BH None C
parameter block starts from
03H
237 IN NTFS, FAT and root FCB MFT Hidden blocks Boot sector B
directory is replaced by
238 Block # 2 is the safest block True False NA NA B
to store the backup of boot

Safi Khan | Virtual University of Pakistan


223 Computer Science MCQs for NTS / PPSC

block
239 The keyboards interface as True False NA NA B
discussed earlier uses the
IRQ0 and the port 64H as
data port
240 FAT12 will have 12-bit wide True False NA NA A
entries and can have
2^12=4096 entries
maximum

Safi Khan | Virtual University of Pakistan


224 Computer Science MCQs for NTS / PPSC

CS610-Computer Network
ID Qus A B C D Ans
1 Ethernet uses a ____________ 8 32 48 64 C
static addressing scheme in which
each device is assigned a unique
address by the manufacturer
2 The --------- bit preamble in the 8 16 32 64 D
Ethernet frame format that
precedes the frame contains
alternating 1s and 0s that allow the
receivers hardware to synchronize
with the incoming signal
3 The third field of the header 8 16 32 48 B
consists of ------ bit Ethernet frame
type
4 An interface for twisted pair BNC- t base 10 RJ 45- t base BNC-t base 5 RJ 45-t base 2 B
Ethernet must have a 10
____________ connector, and must
generate signals according to
the_____________ specification
5 A bridge uses the ___________ to Source , Source , Destination, None from above A
determine which computers destination source source
connect to which segment, and
uses the __________ to determine
whether to forward a copy of frame
6 Formally named __________ 10 Base 2 10 Base 5 10 Base T None of the given C
informally known as the thick wire
Ethernet or Thick net
7 Formally named --------------- 10 Base 2 10 Base 5 10 Base T None of the given A
informally known as thin wire
Ethernet or thin net
8 Formally named __________ 10 Base 2 10 Base 5 10 Base T None of the given C
informally known as the twisted
pair Ethernet or TP Ethernet
9 Most NICs contain DMA(Direct Multiplexer Transceiver None of the given A
_______________ circuitry that Memory
allows the NIC to operate Access)
independent of the CPU
10 A system with redundant bridges Loop Filters Spamming All above A
might have a problem with_______
in the system
12 A Bridge can ________ Filter a frame Forward a Extend a LAN Do all the above D
frame
13 ________ has a jitter zero Virtual Private Isochronous Asynchronous None of the given A
Network Network Network
14 Unlike Frame Relay and ATM, SMDS Connectionless Connection Both None of the given B
(Switched multi-megabit Data service oriented Connectionless
service) offers_______ paradigm service and Connection-
paradigm oriented service
paradigm
15 ATM assigns each VC a 21-bit 22-bit 23-bit 24-bit D
_____________ identifier that is

Safi Khan | Virtual University of Pakistan


225 Computer Science MCQs for NTS / PPSC

divided two parts to produce a


hierarchy
16 Most WAN systems include a Hierarchal Default route Shortest path None of the given B
mechanism that can be used to address
eliminate the common case of
duplication routing is
called___________
17 The next hop to which a packet is Packets Packets Path the packet Non of the given A
sent depends only on destination original source has taken
18 When an Broadcasting Multicasting Unicasting None of the given A
application_____________data, it
makes a copy of the data available
to all other computers on the
network?
19 A__________provide a mechanism Static Configurable Dynamic None of the given A
that a customer can use to set a addressing addressing addressing
physical address scheme scheme scheme
20 _____________ sense a signal on Repeater Bridge Hub None of the given A
one cable and then transmits an
amplified copy on the other cable
21 The maximum size of an Ethernet 250 meters 500 meters 700 meters None of the given B
segment is___________
22 FDDI can transmits data at a rate 100 million bits 100 million 100 million bits None of the given A
of___________ per second bits per per second
second
23 Computers attached to an ether CSMA/CD CSMA/CA TOKEN PASSING None of the given A
use ------ in which a computer waits
for the ether to be idle before
transmitting a frame
24 -------------- have advantages arisen CRC Parity Checksums None of given A
from the size and ease of
computation
25 The term -------- is used to denote Packet Frame Data None of the given B
the definition of a packet used with
a specific type of network
26 ------ has no way to determine the Ping Trace route ICMP Non of the given A
cause of the problem
27 In -------------, network occupies the LAN WAN MAN None of the given A
smaller area like a room a floor or a
building
28 In ---------, network occupies larger LAN WAN MAN None of the given B
areas like cities & countries
29 No error detection scheme is True False NA NA B
perfect because transmission errors
can affect the additional
information as well as the data
30 A typical port on an ATM switch OC-2 speed OC-3 speed OC-3 speed OC-3 speed C
operates at __________ or higher (155Mbps) (100Mbps) (155Mbps) (155Gbps)
31 The product of delay and Area Volume Length None of the given B
throughput measures the _____ of
data that can be present on the
network
32 __________is used for compressed Constant Bit Variable Bit Available Bit None of the given B
Safi Khan | Virtual University of Pakistan
226 Computer Science MCQs for NTS / PPSC

audio and video where the data Rate (CBR) Rate (VBR) Rate (ABR)
rate depends on the level of service service service
compression that can be achieved
33 Which of the following is a Bridge Repeater Hub All the given D
connecting device?
34 A bridges function in the Physical (MAC) Data link Network Physical (MAC) B
_________ layers(s) and Data link
35 A Bridge forwards or filters a frame Layer 2 source Source nodes Layer 2 Layer 3 C
by comparing the information in its address physical destination destination
address table to the address address address
frames__________
36 IEEE LLC/SNAP header is --------, 8 octets 8 bytes 8 bits None of the given A
which is used to specify the type of
data
37 An ------------method, the network Explicit frame Ideal frame Implicit frame None of the given A
hardware designers specify how type type type
type information is included in the
frame and the value use to identify
various frame types
38 Local Talk is a LAN technology that Star topology Bus topology Ring topology None of the given B
employs -------------
39 The Fast Ethernet hardware 10 Mbps 100 Mbps 1000 Mbps None of the given B
operates at a rate of --------
40 ---------- scheme, which is designed Parity Parity CRC None of given A
to help detect transmissions errors,
send one extra bit of information
with each character
41 Computer networks are often Ethernet Switch Packet networks None of the given C
called -------------- because they use networks
packet technology
42 ------ Program sends a message to a Ping Traceroute ICMP Non of the given A
remote computer and reports
whether the computer responds
43 In Point-to-Point topology there are Tree and Ring Star and Ring Star and Tree None of the given C
two topologies
44 A network uses a ------arranges for Star Topology Ring Topology Bus Topology None of the given B
computers to be connected in a
closed loop
45 An interface for thin Ethernet must RJ-45, 10 Base T RJ-45, 10 Base BNC, 10 Base 2 BNC, 10 Base T D
have an ____________ connector, 5
and must generate signals
according to the_____________
specification
46 ________ of TCP/IP layering model, Physical Layer Network Internet Layer Transport Layer A
corresponds to basic network Interface Layer
hardware
47 _______ protocols of TCP/IP Physical Layer Network Internet Layer Transport Layer D
layering model specify how to Interface Layer
ensure reliable transfer
48 ________is called an end-to-end IP UDP TCP None of the given B
protocol because it provide a
connection directly from an
application on one computer to an
Safi Khan | Virtual University of Pakistan
227 Computer Science MCQs for NTS / PPSC

application on a remote computer


49 ____________ uses distance vector BGP OSPF RIP None of the given C
approach to define routing
50 _______ is ideal in a situation Flood-and - Configuration- Core-Based None of the given A
where the group is small and all Prune and -Tunneling Discovery
members are attached to
contiguous Local Area Networks
51 Router that decrements TTL to __ 0 1 2 3 A
sends ICMP time exceeded
message, with router s address as
source address
52 Protocol addresses are abstractions hardware software operating internet B
provided by ___________ system
53 Although message exchange can be True False NA NA A
used to bind addresses, sending a
request for each binding is
hopelessly inefficient
54 ARP is almost always used to bind a 32, 48 24, 32 32, 64 32, 128 A
___-bit IP address to a ___-bit
Ethernet address
55 In the 1970s large organizations True False NA NA A
began to acquire multiple
networks. Each network in the
organization formed island.
Employees needed to choose a
computer appropriate for each
task. So they needed multiple
screens, keyboards and computers
56 In which method of Address T D C T, C C
Resolution Protocol the protocol
address is determined by hardware
address? Were "T" stands for Table
lookup, "C" for Closed-form
Computation and "D" for Data
Exchange?
57 Which method of Address T C D C, D A
Resolution Protocol is useful with
any hardware? Were "T" stands for
Table lookup, "C" for Closed-form
Computation and "D" for Data
Exchange?
58 In which method of Address T, C T C D D
Resolution Protocol the
implimentation is more difficult?
Were "T" stands for Table lookup,
"C" for Closed-form Computation
and "D" for Data Exchange?
59 Which method of Address T, D C T T, C D
Resolution Protocol resolution with
minimum delay? Were "T" stands
for Table lookup, "C" for Closed-
form Computation and "D" for Data
Exchange?

Safi Khan | Virtual University of Pakistan


228 Computer Science MCQs for NTS / PPSC

60 The general form of an IP datagram True False NA NA A


is with a header followed by data.
The header contains information
that controls where and how the
datagram is to be sent
61 To save traffic, an EGP does not True False NA NA A
summerize routing information
from the autonomous system
before passing it to another
autonomous system
62 ------------- was especially concerned IEEE APRA EIA None D
about the lack of high powered
computers
63 Missing eot indicates sending True False NA NA A
computer crashed in frame format
64 The -------------term refers to the Packets Packets Fram None of given A
general concept of a small block of
data
65 CRC can detect more errors than a True False NA NA A
simple shecksum
66 The network that uses a -------------, Star topology Bus topology Ring topology None of the given B
usually consist of a single long cable
to which computer attach
67 LAN that use ATM technology have Star topology Bus topology Ring topology None of the given C
a -------------
68 A bridge uses --------------- to Source address, Destination Destination source adress, A
determine which computer is destination adress, adress, source source address
connected to which segment, and address destination address
uses the ----- ---------- to determine address
whether to forward a copy of frame
69 --------------- has a jitter zero Virtual Private Isochronous Asynchronous None of the given A
Network Network Network
70 The network with Throughput T and D+T DT DXT D/T C
Delay D has a total --------------- bits
in transit at a time
71 One repeater ---------------, two Double, triple Double, 4 time half, triple Double, half A
repeaters --------------- the maximum
cable length limitation
72 End-to-end delivery service is True False NA NA A
connection oriented
73 A single networking technology is True False NA NA B
best for all needs
74 Twice NAT allows a site to run True False NA NA A
servers
76 ________ device is used for Hub Switch Router none of the given A
multicasting
77 ___________ does not depend on PIM-DM PIM-SM PIM-AM none of the given B
any particular unicast routing
protocol
78 A routing table contains_______ The destination The hop count The router ID of All of the given C
network ID to reach the the next hop
network

Safi Khan | Virtual University of Pakistan


229 Computer Science MCQs for NTS / PPSC

79 _______ can be used to propagate Dynamic Static routing Address None of the given A
information about remote routing resolution
networks
80 ________ protocol is designed to OSPF MEOSPF MOSPF none of the given C
use within an organization
81 NAPT stands for Network Network Network None of the given B
________________ Address and Address and Address and
Protocol Port Packet
Translation Translation Translation
82 In dynamic routing, the routing True False NA NA A
table is initialized when system
boots
83 OSPF includes ________ address 30Bit 32Bit 34Bit none of the given B
mask with each address
84 Twice NAT fails if an application True False NA NA A
uses the IP addresses instead of
Domain Name
85 _________ uses window IP UDP TCP none of the given C
mechanism to control the flow of
data
86 TCP uses _______ mechanism to door window acknowledgmen retransmission B
control the flow of data t
87 IGPs stand for _________ Internal Interior Intermediate None of the given B
Gateway Gateway Gateway
Protocols Protocols Protocols
88 ________ protocol uses distance IGP BGP RIP none of the given C
vector algorithm
89 __________measures distance in BGP OSPF RIP Non of these C
network hops, where each network
between the source and
destination counts as single hop
90 Network Address Translation (NAT) True False NA NA A
requires device to perform packet
translation
91 We use the term _______ to refer routing path routing metric routing switching B
to a measure of the path that
routing software use when
choosing a route
92 Which of the following is a correct 105.220.136.10 105.220.136.1 105.220.136.10 105.220.136.100. A
representation of the IPv6? 0.255.255.255. 00.255.255.25 0.255.255.255.2 255.255.255.255.
255.0.0.18.128. 5.256.0.0.18.1 55.0.0.18.128.1 0.0.18.128.140.1
140.10.255.255 28.140.10.255. 40.10.255.255.2 0.255
255 56
93 Part of the 3-way handshake used 8 bit 16 bit 32 bit 64 bit C
to create a connection, requires
each end to generate a random
_____ sequence number
94 Reconstruction of original datagram True False NA NA A
is called reassembly
95 Reliability is the responsibility of Transport Transport Physical Internet A
the ______ layer
97 In Direct point to point (N^2 N)/2 N^2 N-1 None of the given A
communication adding the Nth
Safi Khan | Virtual University of Pakistan
230 Computer Science MCQs for NTS / PPSC

computer requires------------ new


connections
98 The number of connections needed (N^2 N)/2 N^2 N(N-1) None of the given A
for N computer in direct point to
point communication is equal to
99 Hardware that calculates a CRC AND unit and Shift register Shift register None of the given B
uses two simple components XOR unit and XOR unit and AND unit
100 The Gigabit Ethernet hardware 10 Mbps 100 Mbps 1000 Mbps None of the given C
operates at a rate of --------
101 ________ computes shortest paths Greedy Distance Dijkstas Non of the given C
in a graph by using weights on algorithm vector algorithm
edges as a measure of distance algorithm
102 Basic LAN technologies such as Connectionless Connection- Both None of the given A
Ethernet, Token Ring, and FDDI use service oriented Connectionless
a _____ paradigm service and Connection-
paradigm oriented service
paradigm
103 An Internet Address (IP address) is a 24-bit 32-bit 48-bit None of the given B
unique __________ binary number
assigned to a host and used for all
communication with host
104 The address __________ identifies prefix , suffix suffix , prefix suffix , suffix None of the given A
the physical network to which the
computer is attached, while the
_______ identifies an individual
computer on that network
105 ___________ places the boundary Class A Class B Class C Class D A
between the first and second octets
106 ___________ places the boundary Class A Class B Class C Class D B
between the second and third
octets
107 ___________ places the boundary Class A Class B Class C Class D C
between the third and fourth octets
108 ________ field of header indicates FLAGS FLAGMENT IDENTIFICATION None of the given A
whether a datagram is a fragment OFFSET
or a complete datagram
110 ______ provides connectionless TCP UDP IP None of the given B
service
111 UDP and TCP are both_________ Physical Data link Network Transport D
layer protocols
112 ________identifies which Source port Source port Destination Port None of the given C
application program on receiving
computer should receive the data
Logical address
113 ________ identifies the application Destination Source port Logical address None of the given B
program that sent the data Port
114 The Border Gateway Protocol (BGP) UDP TCP Both UDP and None of the given B
uses_________ for all TCP
communication
115 Which of the following protocols RIP OSPF BGP RIP and OSPF C
allows the sender and receiver to
enforce polices

Safi Khan | Virtual University of Pakistan


231 Computer Science MCQs for NTS / PPSC

116 ICMP message transport is acted True False NA NA A


upon by getting ICMP encrypted in
IP
117 These packets serve same purpose Intranet, LAN Internet, WAN Intranet, WAN Internet, LAN D
on ________ as frames on ______
118 Address mask defines how many True False NA NA B
bits of address are in suffix?
119 A computer attached to a given True False NA NA A
network can only communicate
with other computers attached to
the same network. Is this a problem
with multiple networks?
120 The term self-identifying is used for itself prefix suffix mask A
Classful IP addresses because the
class of the address can be
computed from the
address__________
121 Find the class of the address: A B C E D
11110011 10011011 11111011
00001111
122 Find the class of the address: A B C E B
10100111 11011011 10001011
01101111
123 On of the design goals for unicast consistency inconsistency stability dynamic C
route propagation is __________ addressing
124 Propagation multicast routing True False NA NA A
information differs dramatically
from unicast route propagation?
125 The IP multicast abstraction allows one or more only one no many C
an application running on an
arbitrary computer to leave a
multicast group at any time. While
_____________ application on a
computer remain a member of a
group
126 In IPv6 the type of address used for Anycast Unicast Multicast Non of the given D
collection of computers with same
prefix. Are known as_________
127 Special types of addresses in IPv6 Unicast Anycast Multicast Non of the given C
used for multiple destinations;
possibly not at same site. Are
known as_________
128 UDP offers application programs a True False NA NA A
Message-Oriented Interface,
applications can depend on
protocol to preserve data
boundaries
129 The time for acknowledgement to Distance to Current traffic Distance to non of these A
arrival of packet depends on destination and conditions destination
Current traffic
conditions
130 Cost, effort, risks, and resources are Estimation Testing Development Maintenance A
the factors included in--------
Safi Khan | Virtual University of Pakistan
232 Computer Science MCQs for NTS / PPSC

131 There are _______ possibilities to 1 2 3 non of these B


detect the destination using Trace-
route
132 _______ is used for single Multicast Broadcast unicast none of the given C
destination computer
133 Although the ARP message format 16-bit 48-bit 64-bit 128-bit B
is sufficiently general to allow
arbitrary protocol and hardware
addresses. ARP is almost always
used to bind a 32-bit IP address to a
____ Ethernet address
134 Which is not the type of error Source quench Time Destination none of the given D
messages defined by ICMP exceeded unreachable
135 End to End delivery Service of IP Connection Connectionles both a and b none of the given B
datagram is _____ oriented s
136 ________ is a type of address used Cluster unicast Multicast none of the given A
for collection of computers with
same prefix
137 IPv6 ______________ is Destination Intermediate Source Medium C
responsible for fragmentation. routers
Routers simply drop datagrams
larger than network
138 _______ Source is responsible for IPV4 IPV6 Both none of the given B
fragmentation
139 ________ message is sent in TCP/IP IGMP ICMP none of the given C
response to incoming datagrams
with problems
140 ________ field is used to identify a FLOW LABEL TRAFFIC CLASS Both a and b none of the given C
specific path through the network
141 Connectionless service, Message- TCP UDP IP none of the given B
Oriented protocol, best-effort
delivery service, arbitrary
interaction & operating system
independent are the characteristics
of ___________________
142 The process of using a routing table Encapsulation Reassembling Routing or None of the given C
to select a next hop for a given forwarding
datagram is called __________
143 A multicast routing scheme in Distance Vector Core Based Protocol Protocol B
which the protocol software builds Multicast Tree (CBT) Independent Independent
a delivery tree from a central point Routing Multicast_Spars Multicast_Dense
is called __________ Protocol e Mode (PIM- Mode (PIM-DM)
(DVMRP) SM)
144 Whenever it handles a packet, IP postfix, Infix Infix, prefix prefix, suffix non of these C
software needs to separate the
destination address into a
_________ and ___________
145 Connection-oriented service, Point- IP UDP TCP None of the given C
to-point, Complete reliability, Full-
duplex communication, Stream
interface, Reliable connection
startup and Graceful connection
shutdown are the services provided
Safi Khan | Virtual University of Pakistan
233 Computer Science MCQs for NTS / PPSC

by__________
146 _____ Protocol provides error IGMP SNMP ICMP none of the given C
reporting mechanism
147 ________ encapsulates IP datagram Network Datalink Layer Network Layer None of the given A
as data area in hardware frame Interface Layer
148 TTL stands for __________ Time to Learn Time to Leave Time to Live none of the given C
149 ______ layer Provides reliable Network Transport Datalink none of the given B
delivery of datagram
150 Which protocol is used to test ICMP IGMP TCP/IP none of the given A
different tools
151 Routers use _______ to forward Traffic class Flow label Destination none of the given B
datagrams along prearranged path address
152 NEXT HEADER field in the base True False NA NA A
header defines type of header it
appears at the end of fixed-size
base header
153 Every hardware technology Least Maximum Fragment Frame B
specification includes the definition
of the maximum size of the frame
data area, which is called the
____________ Transmission Unit
154 Postfix defines how much of True False NA NA B
address used to identify network
155 ______ contains all information Header Fragment Frame none of the given A
needed to deliver datagram to the
destination
156 The Source can configure outgoing Segmentation Defragmentati Fragmentation None of the given C
datagrams to avoid _________ on
157 The Current version of IP-Version 4 18 years 20 years 22 years None of the given B
is _____ old
158 The Header format of IPv6 is True False NA NA A
entirely different
159 _______ shows senders preference Type Service Type Service Priority None of the given B
for low latency, high Reliability
160 The Network Layer Protocol ICMP Instant Control Internet Initial Control None of the given B
stands for____________ Message Control Message
Protocol Message Protocol
Protocol
161 IPV6 address consists of ________ 32 Bits 64 Bits 128 Bits none of the given C
162 _______ is a technique used to Segmentation Fragmentation Encapsulation none of the given B
Limit datagram size to small MTU of
any network
163 ICMP message transport is acted De- Encapsulated Segmented none of the given B
upon by getting ICMP _________ in encapsulated
IP
164 IETF stands for _____________ Internet Internal Internet none of the given A
Engineering Efficient Task Engineering
Task Force Force Technical Force
165 Which of the following protocols BGP OSPF RIP OSPF and RIP B
provide the routing information at
the autonomous system level?
166 A one-to-many communication Unicast Multicast Broadcast Unicast & B

Safi Khan | Virtual University of Pakistan


234 Computer Science MCQs for NTS / PPSC

between a source and a specific Multicast


group of hosts is classified as
a_______ communication
167 _______ includes a 32-bits address RIP OSPF BGP None of the given B
mask with each address, which
allows the address to be classful,
classless, or subnetted
168 In TCP when a computer sends a ACKNOWLEGE SEQUENCE ACKNOWLGEGE None of the given A
segment, the__________ and NUMBER, NUMBER, NUMBER,
_______ fields refer to incoming WINDOW WINDOW SEQUENCE
data NUMBER
169 _________ is used to attach two BGP IGP EGP none of the given C
autonomous systems
170 Routing inserts or changes values in MAC address routing table both (a) and (b) none of the given B
_______
171 NAT software does not allow a PC True False NA NA B
to connect with the Internet and
act as a NAT device at the same
time
172 Each autonomous system used to True False NA NA A
communicate among autonomous
systems by chooses an IGP
173 Interior Gateway Protocols (IGPs) True False NA NA A
and Exterior Gateway Protocols
(EGPs) two broad classes of
Internet Routing Protocol
174 The computer uses _________ to ICMP IGMP SNMP None of the given B
inform Local router about the last
application when it leaves
175 IPV6 address with ______ leading 96 100 120 None of the given A
zeros is interpreted to hold an IPV4
address
176 For _____________, information Efficiency Security Accuracy Anomalies A
about forwarding is stored in a
routing table, which is initialized at
system initialization and must be
updated as network topology
changes
177 Class A mask is 255.0.0.0 which is Unicasting Multicasting Subnetting Subnetting C
used for ______
178 When one computer sends an ARP True False NA NA B
message to another the message
travels inside the hardware frame.
Technically, placing a message
inside a frame for transport is not
called encapsulation
179 Which one of these is not a main It includes It has universal It combines It has universal D
feature of connectionless service extension of addressing collection of addressing and
LAN abstraction and the data is physical the data is
delivered in networks into a delivered in
packets single virtual packets frames),
frames), each network without a header
with a header
Safi Khan | Virtual University of Pakistan
235 Computer Science MCQs for NTS / PPSC

180 Which one is NOT the function of Traceability Reach ability Both a and b None of the given B
ping program
181 A datagram cannot be larger than MTU Size IP header None of the given A
________ of a network over which
it is sent
182 MTU Stands for _______ Minimum Maximum Multicast None of the given B
transmission transmission transmission
unit unit unit
183 Fragmentation when using ICMP for True False NA NA A
path MTU should be avoided
184 HEADER LEN field gives size of True False NA NA A
extention header
185 The process of learning the path True False NA NA A
MTU is known as path MTU
discovery
186 ________ is less complex and easy TCP UDP IP None of the given B
to understand
187 IPV6 128 bits address includes Host sufix Host prefix source Prefix None of the given A
network prefix and ________
188 The Universal Datagram is not an True False NA NA B
end-to-end protocol
189 Asynchronous Transfer Mode uses 51 52 53 55 C
small fixed size cell. Each cell
consist of ----------- octets
190 What will be the bandwidth rate for 500 MHz 550 MHz 600 MHz 650 MHz C
future (possibly 10 Gigabyte)
Ethernet?
191 Asynchronous Transfer Mode uses Connection-less Connection- Both None of given B
the concept of .. network oriented
network
192 The fiber-modem converts data Pulses of light Electrons Electromagnetic None of these A
into _________ then transmits signals
cover the optional fiber
193 How many methods exist for 2 3 4 5 A
computing routing table?
194 To span long distance or many Segment Fiber optics Packet switches None of the C
computers, networks must replace transformation above
shared medium with ..
195 Which of the following statement is It is very simple Packet switch It is used in RIP All of the above D
true regarding Distance-vector to implement updates own
routing? routing table
first
196 What will be the bandwidth rate for 100 MHz 150 MHz 200 MHz 250 MHz D
1000Base-T Gigabyte or ATM?
197 Which of the following statement is Jitter is used for Jitter can Jitter is All of the above D
true regarding Jitter? variance in occur when a significance for
transmission packet is voice, video and
delays delayed data
198 The maximum cable length of a LAN Fixed Unlimited Fixed and None of these A
is _____ Unlimited in
different
conditions

Safi Khan | Virtual University of Pakistan


236 Computer Science MCQs for NTS / PPSC

199 Jitter is significance for ---------------- Voice Video Data All of above D
--
200 The routing table contains topology of the destination both of the none of the B
information about the network above above
immediately around it
201 Which of the following is called Connection in Connection in Connection in None of the B
virtual channel? VCI ATM virtual circuit above
202 If a bridge builds up address list for 0 1 2 3 C
each segment that consists of
physical addresses of the computer
attached to that segment. So, when
the bridge boots, the size of list will
be__ for each segment
203 Frame forwarding of a bridge is Layer 3 source Layer 3 Layer 2 Layer 2 Source C
based on _________ address destination destination address
address address
204 The process of forwarding the Routing Switching Communication None of the A
packets of information is above
called.
205 Which one of the following is a It is inflexible It is done at It has low All of the above D
property of static routing? boot time network
overload
206 According to a bridges It forward the It does not It does not It forwards the B
Performance, if both the sauces frame to the forward the forward the frame to every
and destination are on the same other segment frame to the frame to the other segment
segment other segment same segment
207 The protocol address of the next Encrypted Decrypted Translated Non of these C
hop must be _____________ to an
equivalent hardware address
before a packet can be sent
208 A _____________ address-binding New Similar Separate Old D
table is used for each physical
network
209 UDP provides connection-oriented True False NA NA B
service
210 The UDP stands for__________ Universal User Datagram United None of the given B
Datagram Protocol Datagram
Protocol Protocol
211 In 3-way handshake TCP requires to 30 bit 32 bit 34 bit none of the given B
generate a random ________
sequence number
212 TCP stands for _______ Transport Transmission Terminal control None of the given B
control control protocol
protocol protocol
213 Which protocol working at the IP ARP TCP UDP D
Transport layer provides a
connectionless service between
hosts?
214 Which protocol works at the IP ARP TCP UDP C
Transport layer and provides virtual
circuits between hosts?
215 Which protocol works at the IP ARP TCP UDP A
Internet layer and provides a
Safi Khan | Virtual University of Pakistan
237 Computer Science MCQs for NTS / PPSC

connection service between hosts?


216 If a host broadcasts a frame that RARP ARPA ICMP TCP A
includes a source and destination
hardware address, and its purpose
is to assign IP addresses to itself,
which protocol at the Network
layer does the host use?
217 If a router interface is congested, RARP ARP ICMP IP C
which protocol in the IP suite is
used to tell neighbor routers?
218 What is the valid host range the IP 172.16.10.20 172.16.10.1 172.16.10.16 172.16.10.17 D
address 172.16.10.22 through through through through
255.255.255.240 is a part of? 172.16.10.22 172.16.10.255 172.16.10.23 172.16.10.30
219 What range of addresses can be 1126 1127 128190 128191 D
used in the first octet of a Class B
network address?
220 What range of addresses can be 1-127 129-192 203-234 192-223 D
used in the first octet of a Class C
address?
221 How many bytes is an Ethernet 3 4 5 6 D
address?
222 What protocol is used to find the RARP ARP IP ICMP B
hardware address of a local device?
223 Which of the following is the 172.16.10.255 172.16.255.25 172.255.255.25 255.255.255.255 B
broadcast address for a Class B 5 5
network ID using the default subnet
mask?
224 Which class of IP address provides a A B C D C
maximum of only 254 host
addresses per network ID?
225 What is the broadcast address of 10.254.255.23 10.254.255.24 10.254.255.255 10.255.255.255 A
the subnet address 10.254.255.19
255.255.255.248?
226 What is the broadcast address of 172.16.99.255 172.16.127.25 172.16.255.255 172.16.64.127 B
the subnet address 172.16.99.99 5
255.255.192.0?
227 If you wanted to have 12 subnets 255.255.255.25 255.255.255.2 255.255.255.24 255.255.255.255 C
with a Class C network ID, which 2 48 0
subnet mask would you use?
228 What is the port number range that 11023 1024 and 1256 165534 B
a transmitting host can use to set above
up a session with another host?
229 Which of the following ranges are 11023 1024 and 1256 165534 A
considered well-known port above
numbers?
230 What is the broadcast address of 10.10.10.255 10.10.11.255 10.10.255.255 10.255.255.255 B
the host subnet address
10.10.10.10 255.255.254.0?
231 What broadcast address will the 192.168.210.25 192.168.210.2 192.168.210.7 192.168.210.15 C
host 192.168.210.5 5 54
255.255.255.252 use?
232 If you need to have a Class B 255.255.255.25 255.255.255.1 255.255.0.0 255.255.255.192 B
network address subnetted into 2 28
Safi Khan | Virtual University of Pakistan
238 Computer Science MCQs for NTS / PPSC

exactly 510 subnets, what subnet


mask would you assign?
233 Which protocol is used to look up ARP IP RARP TCP C
an IP address from a known
Ethernet address?
234 What is the subnet address of the 192.168.100.32 192.168.100.2 192.168.100.0 192.168.100.16 B
IP address 192.168.100.30 4
255.255.255.248?
235 Which of the following is the valid 192.168.168.12 192.168.168.1 192.168.168.12 192.168.168.128- A
host range for the IP address 9-190 29-191 8-190 192
192.168.168.188 255.255.255.192?
236 What is the broadcast address of 192.168.99.127 192.168.99.63 192.168.99.23 192.168.99.31 C
the subnet address 192.168.99.20
255.255.255.252?
237 What is the valid host range that 192.168.10.32- 192.168.10.33 192.168.10.33- 192.168.10.33-61 C
the host ID 192.168.10.33 63 -63 62
255.255.255.224 is a part of?
238 Which protocol does DHCP use at IP TCP UDP ARP C
the Transport layer?
239 Which of the following is the valid 192.168.168.12 192.168.168.1 192.168.168.12 192.168.168.128- A
host range for the IP address 9-190 29-191 8-190 192
192.168.168.188 255.255.255.192?
240 Which protocol is used to find an IP ARP RARP BootP B
Ethernet address from a known IP
address?
241 Which class of IP address has the A B C A and B A
most host addresses available by
default?
242 Which protocol does Ping use? TCP ARP ICMP BootP C
243 Which protocol is used to send a TCP ARP ICMP BootP C
Destination Network Unknown
message back to originating hosts?
244 What is the subnet broadcast 192.168.10.16 192.168.10.19 192.168.10.23 192.168.10.31 D
address the host 192.168.10.17
with four bits of subnetting will
use?
245 What is the subnet broadcast 172.16.10.127 172.16.10.255 172.16.255.255 172.16.10.128 A
address the host 172.16.10.12 with
nine bits of subnetting will use?
246 What is the valid host range of the 172.16.10.48- 172.16.10.33- 172.16.10.0-254 172.16.10.60-94 B
IP subnet address 172.16.10.61 63 62
255.255.255.224?
247 What protocol is used to resolve an IP ARP RARP BootP C
Ethernet address to an IP address?
248 What protocol is used to resolve an IP ARP RARP BootP B
IP address to an Ethernet address?
249 Due to revolutionalization of IP-V6 56kbps to 512kbps to 56kbps to 1gbps none of the given C
the speed has increased from 512kbps 1gbps
_______
250 Whenever it handles a packet, IP True False NA NA B
software needs to separate the
destination address into a prefix

Safi Khan | Virtual University of Pakistan


239 Computer Science MCQs for NTS / PPSC

251 NAT is not useful at a residence True False NA NA B


with Cable Modem or DSL
connectivity
252 Autonomous System chooses a True False NA NA A
routing protocol to exchange
routing information which is passed
before being summarized to
another group
253 As the Internet grew, the original 2 3 4 5 B
Classful addressing scheme became
a limitation. The IP address space
was being exhausted because all
networks had to choose one of
________ possible sizes
254 EGP stands for _________ Exterior Extension Explicit Gateway none of the given A
Gateway Gateway Protocol
Protocol Protocol
255 Hashing is the transformation of a True False NA NA A
string of characters into a usually
shorter fixed-length value or a key
that represents the original string
256 Reliability is not the responsibility True False NA NA B
of the Transport layer
257 TCP uses the term segment to refer packet message both (a) and (b) None of the given B
to a ________
258 The Universal Datagram Protocol is True False NA NA A
a message-oriented protocol
259 ______________field tells the FLAGS FLAGMENT IDENTIFICATION None of the given D
receiver how to order fragments OFFSET
within a given datagram
260 IP datagram can contains ________ 0-65,535 1-65,535 1-65,536 none of the given B
octets
261 The amount of buffer space True False NA NA A
available at any time is called the
window
262 _______ protocol uses three way UDP TCP IP none of the given B
handshake to begin a connection
263 Typical internet routing uses uses a routing metrics administrative hop cost administrative A
combination of two cost and cost and hop
metrics__________________ routing count
metrics
264 Network Address and Port Network Network Network None of the given B
Translation (NAPT) is by far the Address Address Address
most popular form of _______ Transmission Translation Transformation
265 The routers within an autonomous Interior Exterior Both Interior None of the given A
system use a _____________ to Gateway Gateway Gateway
exchange routing information protocols(IGPs) protocol protocols(IGPs)
(EGPs) and Exterior
Gateway
protocol (EGPs)
266 TCP is a connectionless and reliable True False NA NA B
transport protocol
267 Which of the following are interior RIP OSPF BGP RIP and OSPF D
Safi Khan | Virtual University of Pakistan
240 Computer Science MCQs for NTS / PPSC

routing protocols?
268 In IP routing, forwarding refers to Datagram Packet Message None of the given A
______ transfer
269 Basic NAT does not work well for True False NA NA A
communication initiated from the
Internet
270 o save traffic, an EGP does not True False NA NA B
summerize routing information
from the autonomous system
before passing it to another
autonomous system
271 OSPF is based on-------- Distance vector Link state Path vector Distance vector B
routing routing routing and link state
routing
272 Which of the following protocol OSPF BGP RIP BGP AND RIP C
uses UDP for all message
transmission?
273 OSPF stands for __________ Open Source Open shortest Open Secure open shortest B
Path First path first Path First path first
Protocol Protocol
274 _________ is a current version of 2 3 4 None of these C
BGP
275 OSPF does'nt allows a router to True False NA NA B
introduce routes learned from
another means
276 Preliminary version of IP was called IP - New IP - Next IP - Net None of the given B
_________ Generation Generation Generation
(IPng) (IPng) (IPng)
277 PV6 address consists of ________ 32 Bits 64 Bits 128 Bits none of the given C
278 Header contains all information Destination Source Rectifier Other delivery C
needed to deliver datagram to the address address information
destination computer. But which
one of the following is not included
279 _________ Serve Same purpose in Packets Virtual Packets Virtual Frames Both b and c B
Internet as frames on LAN
280 If a computer on the network Server Client Mainframe None od these A
shares resources for others to use,
it is called ____
281 Terminators are used in ______ Bus Star Ring None od these A
topology
282 In _____ topology, if a computers Bus Star Ring None od these A
network cable is broken, whole
network goes down
283 For large networks, _______ Bus Star Ring None od these B
topology is used
284 ISO stands for International International Integrated None od these C
Standard Student Services
Organization Organization Organization
285 ISO OSI model is used in Stand alone PC Network Both None od these B
environment
286 Network cable lies on _____ layer Application Network Physical None od these C
287 ____ layer decides which physical Application Network Physical Data Link C

Safi Khan | Virtual University of Pakistan


241 Computer Science MCQs for NTS / PPSC

pathway the data should take


288 ISDN is an example of ______ Circuit switched Packet Both None od these A
network switched
289 X.25 is an example of ______ Circuit switched Packet Both None od these B
network switched
290 _____________ allows LAN users to Communication Print server File server None od these C
share computer programs and data server
291 Print server uses ________ which is Queue Spool Node Stack B
a buffer that holds data before it is
send to the printer
292 A standalone program that has LAN intrinsic LAN aware Groupware LAN ignorant A
been modified to work on a LAN by software software software
including concurrency controls such
as file and record locking is an
example of____
293 The ______ portion of LAN Configuration Security Performance None od these B
management software restricts management management management
access, records user activities and
audit data etc
294 hat is the max cable length of STP? 100 ft 200 ft 100 m 200 m D
295 What is the max data capacity of 10 mbps 100 mbps 1000 mbps 10000 mbps B
STP?
296 Which connector STP uses? BNC RJ-11 RJ-45 RJ-69 C
297 What is the central device in star STP server Hub/switch PDC Router B
topology?
298 What is max data capacity for 10 mbps 100 mbps 1000 mbps 10000 mbps C
optical fiber cable?
299 Which of the following architecture ARCnet Ethernet Token Ring None od these B
uses CSMA/CD access method?
300 As the Internet grew, the original True False NA NA A
Classful addressing scheme became
a limitation. The IP address space
was being exhausted because all
networks had to choose one of
three possible sizes
301 wice NAT allows a site to run True False NA NA A
servers
302 The Internet service providers True False NA NA A
coordinate with the Internet
assigned number authority to
obtain their network numbers
303 _______ identifies the application Destination Source port Logical address None of the given B
program that sent the data Port
304 The time for acknowledgement to Distance to Current traffic Both a and b none of the given C
arrive depends on __________ destination conditions

Safi Khan | Virtual University of Pakistan


242 Computer Science MCQs for NTS / PPSC

Misc. MCQs for Pervious NTS / PPSC


ID Qus A B C D Ans
1 The shortest period millisecond nanosecond picosecond microsecond C
of time is a
___________
2 An organic chip is storage chip biochip microchip cilicon chip B
called a
___________
3 One megabyte is 2^10 bytes 2^20 bytes 2^30 bytes non of these B
equivalent to
_________
4 A person who gains hacker worm software zapper A
illegal access to a
computer system
________
5 When the control first step third step second step fourth step B
unit directs the ALU
to perform an
operation on the
data, the machine
cycle is involved in
its _________
6 A type of computer symbolic RISC ASCII-8 ROM burner B
that is faster
because it has fewer
instructions
7 The meerging flash memory PFOM CMOS CISC A
technology that
provides nonvolatile
memory chips is
________
8 Tool to change chip kits RAM burners PROM burner none of these D
PROM chips are
called
9 Assuming 8 bit for 10 CPS 120 CPS 12 CPS none of these C
data, 1 bit for parity,
1 start bit and 2 stop
bits, the number of
characters that 1200
BPS communication
line can transmit is
10 The widely used a bit ASCII 7 bit ASCII EBCDIC none of these B
code in data
communication is
11 If a processor does offline time shared on line none of these A
not hav direct and
unassisted access to
data items, these
Safi Khan | Virtual University of Pakistan
243 Computer Science MCQs for NTS / PPSC

items are said to be


12 Rearranging data in updating batching sorting summarising C
a new sequence is
known as
13 Which of the sender office device medium receiver B
following is not a
component of
telecommunications
?
14 In Time division time is double time slicing at total time available none of above D
multiplexing between bits of CPU level takes in the channel is
a byte place divided between
several users and
each user is allotted
a time slice
15 Point of scale terminal smart terminal Terminal associated none of above C
terminal to associated with with OCR
MICR
16 A bootstrap is the flat cable the flat cable additional memory a small D
that connects from the disk device initialization
the CPU ot the controller card program to start
printer to the disk 8 up the computer
drive
17 Data verfication is a rechecking the entering data checking whether checking the A
process of data entered by on two the instructions in a computer results
one person different media program are in with manual
through re-entry and comparing proper order outputs
by another them
person
18 An A/D converter digital to analog analog to digital voltage to ampere direct to alternate B
does the conversion current
from
19 Program maintaining a changing a adopting an removing the erors B
maintenance means program exactly program due to altogether new from a program
the way it was changes in the program
initially organization
developed
20 A conceptual error logical error execution error syntactical error none of the above A
in a program is a/an
21 Implementation of a compilation of debugging the testing the program all of above D
program involves the program program with data
22 Temporary storage ROMs registers accumulators address B
areas within the
CPU are called
23 Distribution data Entered at Sent to Access from Distributed A
entry means tha different different different places through a network
data can be location where it locations from a known as
originates central place distribution points

Safi Khan | Virtual University of Pakistan


244 Computer Science MCQs for NTS / PPSC

24 Excess-3 code is Weighted code Cyclic Self complementing Aigebraic code C


known as redundancy
code
25 A parallel interface transmit one bit transmit on transmit 8 or more cannot be used to C
at a time more bits at a bits at a time using a connect a printer
time using a single wire to a PC
single wire
26 Pick out the correct In a positional The highest It is not always Each hexa-decimal C
statement number system, symbol in a possible to find the digit can be
each symbol position exact binary number represented as a
represents the number system equivalent to a sequence of three
same value has a value decimal number binary symbols
irrespective of equal to the with a fraction
its position number of
symbols in the
system,
27 Which of the A memory `The content of Entering data into a A memory location D
followint is not location is a memory memory location can hold only a
correct identified by a location does does not changes its data item and not
unique number not change its address a program
called its address address instruction
28 Error reports are an scheduled on-demand exception reports external reports C
example of reports reports
29 Computer follows a Grabage input garbage in great instructions good input good B
simple principle good output garbage out great ouput out
called GIGO wchih
means
30 When the control E-mail machine time l-time ALU time C
unit gets an
instruction it is
called
31 Which of the Magnetic tap Printer VDU terminal Assembler D
following is not
hardware
32 Pick out the wrong Access time - EDP - acronym COBOL - a language Control unit - heart A
definition time needed to for Electronic used for business of computer
access the Data Prodessing data processing
output
33 The lowest level of Operational Traditional Long term planning Strategic B
management is information information information
concerned with
34 Which of the Magnetic tape VDU terminal Hard disk Assembler D
following is not
hardware
35 Pick out the wrong Access time - EDP - acronym COBOL - a language Control unit - heart A
definition time needed to for Electronic used for business of a computer
acess the output Data Processing 1data processing
36 By word processing processing only string a mathod of a software game C

Safi Khan | Virtual University of Pakistan


245 Computer Science MCQs for NTS / PPSC

we mean words and not manipulation providing facility of for playing with
number text processing words like "Hang
man"
37 In computer science, Any output processed data a report printed by plural of data C
by information we coming out form put in computer
mean computer intelligent form
38 Office automation Reducing the Putting robot automation every producing the C
systems are aiming bulk of types of thing in office system which
information on machines reduces burden
paper into from the managers
condensed form minds
in magnetic
medium so that
data can be
processed with
fast speed
39 Conferencing in Transfer of Getting hooked Having unauthorized On-line meanings D
relation to compter documents ot an access to computer using computer
system means electonically via internationla data linked to each
computer linked network of other
to each other computer
40 A dump terminal It has lower IQ it can not be it does not hav a it belongs to first B
signifies that compared to an used as an keyborad connected generation
intelligent independent to it computers
terminal computer
41 Ergonomics is the Cost relationship Different Gradation of various Human aspect of D
study of between computer computer the environment
computer operating professionals aroud the
hardware and systems ocmputer system
software
42 An application Meet specific Run the Run the compiler Enable operating A
package is used to needs of a user acomputer smoothly system control
system better hardware better
43 The part of the interpreter compiler operating system assembler C
computer system
which performs the
huse keeping
functions is called
44 For creating and Spreadsheed Word Graphics Communiation B
editing legal processing
document which
application package
would be most
useful?
45 The concept of On-line database Electronic mail Teleconferencing Teleprinting B
sending/receiving
text etc, on
computer networks

Safi Khan | Virtual University of Pakistan


246 Computer Science MCQs for NTS / PPSC

is called
46 When a bank teller On-line updating On-line On-line query On-line processing C
uses a computer processing
terminal to know
the balance in
customer's acount it
is an example of
47 A computer Source program Object program Machine language Non of the above A
program written in a program
high level language
is called a
48 Object program is A program A program to be The translation of a Non of the above C
written in translated inot high-level language
machine machine into machine
language language language
49 The presence of C++ encapsulation orientation inheritance B
both data and its
related instructions
in an object is
50 In preparing a plan the solution code the document the define the D
program, one program problem program
should first
51 The first Apple a garage a warehouse an apartment a factory A
computer was built
in
52 During the plan the solution code the define the problem analyze the A
development of a program problem
program drawing a
flowchart is a means
to
53 An English-like BASIC pseudocode PL/1 Pascal A
language that one
can use as a
program design tool
is
54 In preparing a coding planning testing documenting C
program, desk-
checking and
translation are
example of
55 The process of desk-checking translation debugging documenting C
detecting, locating
and correcting logic
error is called
56 Comments in the Copiling Translating Linking doucmenting D
program itself are
part of
57 A COBOL program four two five seven A

Safi Khan | Virtual University of Pakistan


247 Computer Science MCQs for NTS / PPSC

has how many


divisions
58 The first high-level COBOL FORTRAN Pascal Ada B
language to be
introduced was
59 The ability of an Polymorphism Encapsulation Inheritance Messaging A
object to interpret a
message using its
own methods is
called
60 The language named C Ada Pascal Modula-3 C
for a French
mathematician is
61 Specifying the kind planning the flowcharting coding the problem defining the D
of input, processing, solution the problem problem
and output required
for a program
occurs when
62 Error messages bug diagnostic translaions mistakes B
provided by a
compiler are called
63 After stating the testing the codein the documenting the translation the B
solution to a program program program program
problem in
pseudocode, the
next step would b
64 The highest-level 4GLs high-level assembly natural D
language are called
65 To active an object, a message an instance a method an attribute A
send
66 Popular object- Pascal, Modula-3 C++, Smalltalk LOGO, PROLOG COBOL, BASIC B
oriented language
67 Software that A binary A Compiler An assembler A link-loader C
translate assembly translator
language into
machine language is
68 A standardized CODASYL BASIC COBOL Ada C
business language is
69 Which of the bit addressable byte fixed word-length variable word- B
following type addressable addressable length addressable
computer can store
one alphanumeric
character in each
number storage
location
70 A computer has a 2^32 2^(32-1) (2^32)-1 None of the above B
word length of 32
bits. The maximum
Safi Khan | Virtual University of Pakistan
248 Computer Science MCQs for NTS / PPSC

address that can be


generated is
71 Which of the Winchester RAM CD-ROM None of the above B
following is
associated with
optics
72 The number 7F00 in 7F16 167F00 7F006 None of the above D
hexadeciam when
multiplied by 61 is
73 The output of a Present input Past input Both a and b None of a and b C
sequential circuit
depends upon
74 Which of the 9-Track 1600 BPI double-sided 33 Mhz - zero-wait 40 MB capacity B
following double density time
descriptions relates
to a folppy diskette
75 In developing a as the last step throughout the only to explain only during the B
program, process errors design phase
documentation
should be done
76 A fourth-generation high-level assembly query language procedural C
language used for language language language
database retrieval
77 A language designed COBOL RPG ALGOL LIPS B
to generate routing
business reports is
78 The lowest level of nonprocedural assembly BASIC machine language D
programming language language
language is
79 An assembly English words mnemonic 0s and 1s Binary digits B
language uses codes
80 The language procedural document problem oriented object oriented D
smalltalk is oriented oriented
81 An operating system set of users form of time- set of programs supervisor C
is a sharing program
82 In by optimizing with two simultaneously concurrently D
multiprogramming, compiler computers
two or more
programs can b
executed
83 Time-sharing of based on time based on input event driven operated by A
resources by user is slices spooling
usually
84 Management of an by interpreter the supervisor utility progarm the CPU B
operating system is program
handled by
85 The proces fo memory memory virtual storage real storage B
allocating main protection management
Safi Khan | Virtual University of Pakistan
249 Computer Science MCQs for NTS / PPSC

memory to
programs and
keeping the
programs in
memory separate
from each other is
called
86 UNIX is an example memory generic NOS utility program B
of an management operating
sysdtem
87 The technique is Paging Queuing Slicing Spooling D
shared systems that
avoid interspersed
printout from
several progarm is
88 The technique Memory Interrupts Virtual storage Prioritized C
whereby part of the allocation memory
program is stored
on disk and is
brought into
memory for
execution as needed
is called
89 An operating system DOS proprietary UNIX NOS B
used exclusively
with th
emanufacturer's
computer
90 A portable operating generic backup allocated utility A
system
91 Another name of page layer shell supervisor C
operating
environment is
92 Loading the booting prompting interrupting paging B
operating system
inot personal
computer is called
93 Which one of the unix page utility program GUI D
ofllowing is
graphical shell?
94 In spooling time sharing program scheduling memory D
multiprogramming, protection
the process of
confining each
progarm to certain
defined limits in
memory is called
95 The crossponding page utility page frames page blocks page modules B

Safi Khan | Virtual University of Pakistan


250 Computer Science MCQs for NTS / PPSC

memory spaces for


pages are called
96 The time between concurrent time response time allocation time event time B
the user's request
and the computer's
reply
97 An on-screen page NOC icon spool C
picture
98 Take-a-turn time- spooling interfacing round-robin prompting C
sharing scheduling
99 Page frames are 1K of 2K bytes 3K of 4K bytes 2K of 3K bytes 2K of 4K bytes D
typically
100 The memory area frames foregroundp page table default drive B
for programs with
highest priority
101 Programs waiting to page frames the background shells queues D
be run are kept on
disk it
102 Prewritten standard pull-down pages supervisors uatilities D
file handling menus
programs are called
103 The signal that the prompt time slice event interrupt A
computer is
awaiting a
command from the
user
104 Another name for virtual page foreground background utility A
virtual memory is
105 NOS refer to the default drive booting operating system for round-robin C
a network scheduling
106 Testing of each program testing volume testing system testing unit testing D
individual program
or module is called
107 The preliminary analysis survery system design feasibility study evaluation C
investigation of a
system project is
also called a(n)
108 The SDLC is defined two phases four phases three phases five phases D
as a project
involving
109 People who will programmer system analysts user client C
have contact with
the system, such as
employees and
customers, are
110 Phase one of a a system survey data gethering a system analysis questionnaires A
system project
involves
Safi Khan | Virtual University of Pakistan
251 Computer Science MCQs for NTS / PPSC

111 The person who fills system user system analyst administrator client B
the role of change
agent is the
112 The scope and true the second the preliminary the system the system analyst B
nature of the phase investigation development
problem is
determined during
113 A chart of positions a data flow a project an organization a Gantt chart C
and departments diagram management chart
within an report
organization is
114 In a data flow vector file source sink D
diagram, a
destination for data
outside the system
is called a
115 In the course of follows system follows precedes systems is the fourth phase A
systems project, analysis development analysis
systems design
116 Positioning of a record layout an organization a decision table a printer spacing D
headings and chart chart
columns for the
report format,
considered during
system design,
might use
117 Programming and system analysis system implementation system design B
testing are elements development
of
118 Data gathering and after the system after system during system during evaluation A
data analysis take survey analysis design
place
119 The kind of preplanned structured observation unstructured B
interview where all
questions are
planned in advance
is called
120 The entire new direct pilot conversion file conversion parallel conversion B
system is used by a conversion
portion of the user
121 A systems analyst detail design preliminary systems analysis a system survey C
would observe the design
flow of data and
interrelations of
people within an
organization during
122 Use to ensure that data flow organization Gantt chart decicion table D
no altermative is diagram chart

Safi Khan | Virtual University of Pakistan


252 Computer Science MCQs for NTS / PPSC

overlooked during
data analysis
123 The phase following preliminary implementation system development system conversion C
detail design is investigation
124 Scheduling system survery decision table prototype Gantt chart D
deadlines and
milestones can be
shown on a
125 Turning an entire auditing outsourcing preliminary protptype B
project over to an investigation
outside firm for
development is
called
126 The person who client analyst change agent user A
request study or
work on a system is
the
127 Super computer are 16 bits of 32 bits of 64 bits of 128 bits of C
usually designed to information information information information
process complex
scientific
applications and the
computational
speed of the system
is most important,
Each adress in the
CRAY-1 holds
128 In EBCDIC (extended 3 bits 4 bits 5 bits 8 bits D
binary coded
decimal interchange
code) each
character is denoted
by
129 Computer follows a good input, good great grabage in, garbage gated input, gated C
simple rule called output instruction, out output
GIGO, GIGO stands gereat output
for
130 Reatining data for storing sorting memorizing outputting A
future reference is
called
131 The term 'word' in bit formed into coded memory size language used A
computer groups instructions
terminology refers
to
132 A group of register address program software A
electronic,
magnetic, or
mechnaical devices

Safi Khan | Virtual University of Pakistan


253 Computer Science MCQs for NTS / PPSC

that store data is


called
133 In ADC the analog pulse generator flip-flop stair case generator register C
voltage signal is
compared with the
signal from a
134 The faster type of time interval parallel closed loop successive B
ADC is
135 Most of the errors in virus programming hardware programs data entry errors D
computer system errors
could b attributed
due to
136 The five basic part of hardware, store, CPU, ALU, software, data bus, control B
computer system software, arithmetic and firmware and bus, address bus,
are memory, VDU logic unit, operating system memory and
and magnetic control unit, printer
tape input device,
and output
device
137 A typical memory location address byte word A
microcomputer has
64k memory. It has
65536 registers,
each register storing
1 byte. Each register
is called
138 Pick up wrong initial conditions differentiators memory or storage repetitive C
statement regarding during is analog circuit is an essential operations of
analog computers integration aer not popular, component of an analog computers
operation are because they analog computer are done to get a
imposed in an are incapable of display on
analog computer handling noisy oscilloscope
during rest ramp signals
mode
139 Diodes are used in phase shifter rectifier binary logic limiter D
analog computer
circuit as
140 factors contributing Finite amplifier Amplifier fall off shunt capacitance of drift voltage in the D
to static errors in gain and and phase shift input or feedback amplifier and
analog computer dielectric at high resistance and current into the
are absorption in frequency leakage resistance of amplifier input and
capactiors input or feedback incorrect values of
capacitance input and
feedback
impedance
141 A computer as directed by automatically at once gradually and B
processes the operator eventually
information

Safi Khan | Virtual University of Pakistan


254 Computer Science MCQs for NTS / PPSC

142 Which of the TTL DTL MOS CMOS D


following IC logic
family has maximum
fan out capacity
143 How many input 7 12 13 14 D
leads will be
required for a chip
containing four two
input NOT gates
144 An error in a glitch hacker virus picel A
computer hardware
and software is
called a bug.
Another name for it
is
145 The correct order of bit-byte-record- bit-byte-record- bit-byte-file-record- bit-byte-field- D
data hierarchy is file-database field-file- field-database record-file-
database database
146 The act of reading erases the is usually not is possible only is possible only A
new data into a previous possible when the register is when the register
register contents of the an accumulator is an accumulator
register or instruction
register
147 Pick up the false computer errors the faster or the space in primary computers can B
statement can usually be informational storage section is manipulate both
braced to faulty raw materials deivided into four numeric and non-
programs or represented by areas: input, numeric symbols
inaccurate input numeric and working storage,
data non-numeric output and program
symbols are storage
called
information
148 Pick up the correct Computer all comparisons the arithmetic-logic computers hav the D
statement about process data are made in the section of the CPU build-in ability to
computer with human control section selects, interprets obey different
intervention and executes the type of instruction
after the program steps
program has
been fed
149 In computer artificial any organic molecular biology molecular scale B
terminology, the intelligence intelligence computer
term wetware
stands for
150 Which of the binary code gray code excess 3-code octal code B
following is termed
ad minimum error
code?
151 A collection of aplication programming system software operating system D

Safi Khan | Virtual University of Pakistan


255 Computer Science MCQs for NTS / PPSC

software that software language


controls the overall
operation of a
computer is called
152 Computer program instruction data both a and b low level language D
consists of
153 The correct is operated from is controlled by is controlled by controls are input, D
processing unit the control the auxiliary input data as it output and
panel storage unit enters the system processing
154 Which of the flip-flop counter shift register accumulator C
following is the
example of
swquential circuit
155 Popular application counter shift registers transfer register all of above D
of flip-flop are
156 Pick up the wrong the information the information the information can computer use D
statement stored in stored in read be written in any sequential access
random access only memory location of random type main memory
memory can be can't be access memory
changed by changed by
overwriting the overwriting the
new information new
information
157 Micro processor is thermionic transistors integratged circuits single integrated D
based on values circuit or chip
158 Real time computing Storage high speed accuracy versatility B
is possible because capability
of the following
number of storage
locations
159 Storage of 1k means 1000 964 1024 1032 C
that it has following
number of storage
location
160 The term 'baud' is a speed at which capacity of error instruction A
measure of the data travels over memory detection/correction execution time
a capability of
communicaiton computer system
line
161 A bootstrap is a memory device an input/output a device to support a small D
device computer initialization
computer program
to start up an
inactive computer
162 An interface is test the system correct the ssallow two enhance the C
basically a errors in incompatible capability of a
component that programs entities with on system/equipment
another

Safi Khan | Virtual University of Pakistan


256 Computer Science MCQs for NTS / PPSC

163 Debug is a term error correction writing of fault detection in determain useful A
denoting process instructions in equipment life
developing a
new program
164 A 64 k-bit word 64 * 1000 bits 64 * 1012 bits 64 * 1020 bits 64 * 1024 bits D
computer has
165 Simulation is a computer is computer full capacity of the the computer D
process in which used to control a gathers data for computer is utilized system and
process later processing program are used
to produce actions
similar to those in
a real physical
system
166 Real time systems are effective in process process data in are not possible to A
process control transactions by manner similar to achieve
means of direct- batch processing
access devices systems
167 A collection of group register file record D
related fields in data
organizing is called
168 Which file random access sequential batch serial A
processing will be or on-line
suited to obtain up-
to-the-minute
information is
response to inquires
from on line station
without delay
169 Characteristic of versatile and speed and ease of all of above D
digital computer are large memory accuracy communication,
simulation and
automation
170 Which of the compiler CPU memory unit chip A
following is not a
hardware
171 A collection of data base file registers organizing A
logically related data
elements that can
be used for multiple
processing needs is
called
172 Pick up the wrong punched cards magnetic disks floppy disk printer D
statement - A digital and tapes and tapes
computer can
read/write data
from/on
173 The sequence of program hardware algorithm debugging A
instruction telling

Safi Khan | Virtual University of Pakistan


257 Computer Science MCQs for NTS / PPSC

the machine to
perform a particular
sequence of
operations is called
174 Pick up wrong the byte - is a unit channel - is a compiler - is a file - is a cover D
definition having a group path to carry computer program used to cover
of wight bit information which translates the records in
(binary digit) from source to written high level computers
destination or language
vice versa understandable by
the computer
175 Flow chart is indicating the indicating the of a chart indicating of debugging B
diagrammatic events of events the flow of the program
representation physical system occurring in the process
logical
sequence and
showing the
inter-relation
between them
176 FORTRAM is an formula formula for translating high formula translator B
acronym for transducer translator level language
177 Pick up the wrong Off-line - is a On-line - is Peripherals - are PL/I is the acronym D
definition system system in which hardware under the Peripheral
peripheral peripheral control of CPU, like Listing/Index
equipment not equipment is in punched card
controlled by direct contact readers, tapes,
CPU with CPU drums, disk, output
devices
178 A Computer enters data into does total changes flow charts provides solutions B
programmer computer planning and into instructions to complex
thinking for a problems
computer
179 Terminal is a device used to point at which ending point in a point where wires B
give supply to a data may leave program are interconnected
computer or enter the
computer
180 Error in computer encoding of data transmission of manipulation of data all of the above D
results could be due data
to
181 Register is a set of capacitors set of paper temporatry storage part of the C
used to register tapes and cards unit within the CPU auxiliary memory
input put in a file having dedicated ro
instructions in a general purpose use
digital computer
182 Accumulator is a storage battery hardware which hardware which hardware used to B
which supplies stores one of stores memory in link the control
the necessary the operands to the memory unit unit with I/O unit
power to the be manipulated

Safi Khan | Virtual University of Pakistan


258 Computer Science MCQs for NTS / PPSC

system by the ALU


183 The computer on line computer bilateral system filp-flop system binary system D
system where only system
two states exist,
either conducting or
non-conducting is
called
184 The data obtained digital data continuous data analog data discrete data D
by counting are
called
185 Which typen of special purpose analog digital hybrid C
computer operates
by directly counting
numbers
186 A group of bit byte word address C
characters that are
treated as single
entity
187 A string of binary bit byte word character B
digits treated as a
unit is called a
188 A bulit in number character word byte address D
that indentifies a
location in storage
189 Each address in discrete number character unique number general number C
storage has a number
190 An address location one new word discrete A
holds _______ data
item ata time
191 It combines the general purpose special purpose discrete computer hybrid computer D
desirable features of computer computer
both analog and
digital computer
192 Pick up the false each address in a computer a string of binary a group of binary B
statement regarding storage must byte is a group digits treated as a digits, or bits is
storage location hav a unique of characters unit is called a byte used to represent
number that are treated a character in
as a single primary storage
entity
193 Pick up the false A general Analog An advantage of A special purpose C
statement purpose computer do fixed word length computer lacks
computer is one not compute computer is that versatility
that can stoer directly with they make efficient
different numbers rather, use of available
programs the measure primany storage
continuousily space
variable
physical

Safi Khan | Virtual University of Pakistan


259 Computer Science MCQs for NTS / PPSC

magnitudes
194 Both the Arithmetic address register accumulator RAM B
Logic Unit and the
control section have
special-purpose
storage location
called
195 Although different manage two select and advance the control the A
computers use data words and interpret sequence register decoder
different processing the result instructions
techniques, the ALU
is every computer
must be able to
196 A basic instruction an instruction an operand and a decoder and an all of the above B
that can be register and an an address accumulator
interpreted by a address register
computer generally
has
197 The followint sequence, accumulator, decoder, address, accumulator, A
registers, instruciton, storage, instruction address, decoder
repectively are used decoder address
for selecting an
instruction, reading
into the register,
and interpreting
198 Compiler is the name given to part of digital translator of source part of arithmetic C
the computer machine to program to object logic unit
operator store the program
information
199 The binary addition, 0 1 0 with no carry 0 with 1 carry D
(1+1) will result is
200 Which of the Exclusive AND Flip-flop circuit Inclusive OR circuit Exclusive OR D
following circuit is circuit circuit
known as half adder
?
201 Which of the (A+B)+C = (AB)C = A(BC) = A+B = B+A A(B+C) = (AB)+(AC) D
following function is A+(B+C) = A+B+C ABC
referred as the
complementary
202 Which of the (AB)bar = (A)bar (A+B)bar = (AB)bar = A+A = A C
following statement + (B)bar (AB)bar (A)bar.(B)bar
is false ?
203 The minimum form A + B.C(bar) AB + C.B(bar) A.C(bar) + B A + C.B(bar) D
of the expression,
(A+B)(A+B+C) will be
204 A flip-flop is a monostable bistable device astable device oscillatory device B
device
205 The output infinity zero 1 ohm 10 ohms B

Safi Khan | Virtual University of Pakistan


260 Computer Science MCQs for NTS / PPSC

impendance of an
ideal operational
amplifier is
206 The input zero infinity 1 ohm 10 ohms B
impendance of an
ideal operational
amplifier is
207 The gain of an ideal infinity zero unity 10^10 A
amplifier must be
208 Pick up worng buffer is a the hardware the portion of CPU register have D
statement temporary that stores data that stores program nothing to do with
storage device CPU is called and receive CPU
external storage inofrmation(data)
media from input devices is
called internal
storage
209 Pick up worng a program that a supervisor an executive a program written D
statement operates a program to program to control to operate a CPU
computer to controls the traffic within the manually is called
imitate another traffic within computer system is Manual program
computer is the computer called Supervisor
called Emulator system is called Program
Program Executive
Program
210 An intelligent translates uses a manages CPU in a converts input into B
terminal is a intelligence for computer for sequential order a computer
terminal that the business organizing data readable form
computer
211 The following truth NAND NOR OR EXCLUSIVE OR D
table is for ( 1,0) = 1;
( 0,1) = 1; ( 1,1) = 1
212 The time required to 1 pieco second 1 nano second 300 nano second to 5 micor second to C
access one word is to 200 pieco to 250 nano 1 micro second 200 micro second
called the memory second second
cycle time. This is a
fixed time for
modern computer
and is of the order
of
213 Choose the a a minicomputer a microcomputer most micro use E
incorrect statement microcomputer can have more chip performs the rigid disk storage
about can be placed on processing arithmetic logic and device rether than
microcomputer, a single silicon capability than control functions of floppy disk drives
minicomputers chip a mainframe a microcomputer
model
214 The smallest logical file field record database B
data entity in
organizing data for

Safi Khan | Virtual University of Pakistan


261 Computer Science MCQs for NTS / PPSC

computer
processing is
215 Storing records one sequential serial batch processing all of the above D
after another in a processing processing
file in an asending or
descending ordre
determined by the
record key is called
216 In which processing batch serial random sequential C
method any file
record can be
directly located and
updated without the
need to read
preceding file
records
217 A group of related data information record field D
characters that are
treated as a single
unit is called
218 The use of computer word processing line printing data processing typing A
to create, view, edit,
store, retrieve and
print text materials
is called
219 Computer performs storage/retrieval calculation logic/comparison all of the above D
following operation
on data
220 The data gathering observation unstructured questionnaire structured C
vehicle that permits interview interview
high-volume
anonymous ansers
221 In the preliminary candidates organization questionnaires decision tables A
design phase, the charts
analyst may prepare
alternative
222 A set of software prototypes data flow CASE Gantt charts C
tools for automated diagrams
design is called
223 a plan to trace data an audit trail a vector sampling volume A
to its source is called
224 The active cell current cell formula range cell address A
225 A preprogrammed function range graph cell A
formula
226 A chart that function pie line bar B
represents only one
value for each
variable

Safi Khan | Virtual University of Pakistan


262 Computer Science MCQs for NTS / PPSC

227 Business quality stacked bar analytical legend presentation D


graphics
228 Intersection of row active address cursor formula cell D
and column
229 The result of label range value displayed value D
formula in a cell
230 Text information in label formula value cell address A
a cell
231 A dot or symbol on a label variable data point axis C
line graph
232 Summarizes plot area label title axis C
information related
to a graph
233 Computer prepared cell clip art analytical range B
art
234 The set of choices menu editor reverse video template A
on the screen is
called a(n)
235 A program that indexing editing program form letter program thesaurus program D
provides synonyms program
is called a(n)
236 A program that can pull-down menu headers block halftone D
indentify
unnecessary words
and wordy phrases
is called a(n)
237 A program that can indexing grammar/style for letter program thesaurus program B
indentify program program
unnecessary words
and wordy phrases
is called a(n)
238 The feature that find and place ragged right word warp right justify C
keeps track of the
right margin is
239 If using verfication verified replace questionable conditional place what-if replace C
with the find and replace
replace feature, this
is called
240 The featuer that searching pasting scrolling editing C
allows viewing any
part of a document
on the screen is
241 The command to scroll copy search move B
transfer text to
another location
without deleting it
from its original
location is
Safi Khan | Virtual University of Pakistan
263 Computer Science MCQs for NTS / PPSC

242 Ragged right means uneven even variable wide A


the right margin is
set to be
243 Spelling checker tab settings pagination function keys a dictionary A
programs use
244 Computer people programmers computer data entry operators system analysts A
who design, write, operators
test and implement
programs are
245 Computer user who librarians peripheral users information officers end-users D
are not computer
professionals are
sometimes called
246 People who prepare programmer librarians printer data entry D
data for processing operators
are
247 Parallel processing is batch processing on-line batch and online none of above C
normally under mode processing mode
mode
248 The factor not track density recording diameter of the disk non of above C
necessary for density
calculating the
storage capacity of a
disk is
249 The sequential master files on master files in a transaction files none of the above B
organization is most direct access batch
suitable for devices processing
environment
250 Which of the magnetic drum magnetic tape magnetic disk none of the above B
following storage
devices that cannot
support both direct
251 Assembly language binary code abbreviations numbers english words B
or symbolic for instructions
languages use
252 COBOL and machine high-level assembly languages obsolete language B
FORTRAN are languages languages
examples of
253 Personal computers cores emulators clones unbundled C
that can use
software designed
for the IBM PC are
called
254 The leading Apple IBM MITS Microsoft D
software
manufacturer is
255 Another name for secondary system packaged software peripheral C
available-for- software software software
Safi Khan | Virtual University of Pakistan
264 Computer Science MCQs for NTS / PPSC

purchase software is
256 A system whereby centralized summarizing packaged software distributed data D
computers and data processing processing
storage are placed
in dispersed location
is known as
257 Which of the MIS PDA CPU LAN A
following is an
acronym for a
computer
department?
258 Relativity a field a transaction memory a master file D
permanent data is
contained in
259 A limitation fo not reusable relatively organized not portable C
magnetic tape as a expensive sequentially
method of storing
data is that it is
260 Before a sequential numbered labeled sorted updated C
file can be updated
the transactions
must first be
261 Hashing, to get an key record file character A
address, is the
process of applying
a formula to a
262 When all access and networked distributed centralized linked C
processing is done in
one location, a
computer system is
said to be
263 Using computer to inscribing detailing CAD/CAM imaging C
design and
manufacture
products is called
264 Entering data into source data CAD/CAM a discrete word MICR entry A
the system as a by- automation system
product of the
activity that
generates the data
is called
265 The rate of screen pixel speed raster rate bit-map speed scan rate D
refreshment is
called
266 Magnetic characters bar code reader MICR inscribers mice microfiche B
are produced on
your bank checks by
267 "Mark sensing" is MICR OMR POS VGA A

Safi Khan | Virtual University of Pakistan


265 Computer Science MCQs for NTS / PPSC

another term for


268 OCR-A is a plotter wand reader standard typeface bar code C
269 POS terminals are calculators UPCs touch-tone cash register D
similar to telephones
270 A computer crime in the salami the Trojan blue-collar crime data didding A
which money is technique Horse
embezzled in small
amout over time is
271 A computer hot site clod site vaccine fierwall D
dedicated to
screening access to
a network from
outside the network
272 One safeguard DES identical the Torjan Horse data didding A
against theft of passwords
alteration of dta is
use of
273 The legislation that Federal Privacy Fair Credit Computer Abuse Act Freedom of A
prohibits Act Reporting Act Information Act
government
agencies and
contractors form
keeping secret
personal files on
individuals
274 A student who piggybacking using the salami data diddling altering stored C
managed to modify technique data
her grades before
they were entered
into the computer
file could be said to
be
275 Computer crimes easy to detect prosecuted blue-collar crimes discovered D
are usually accidentally
276 The "what you are" a badge biometrics a password a magnetized card B
criterion for
computer system
access involves
277 The key factor in a equipment loss of insurance coverage loss of processing D
computer replacement hardware ability
installation that has
met with disaster is
the
278 In anticipation of biometrics disaster DES set of active B
physical destruction, scheme recovery plan badges
every computer
organization should
have a

Safi Khan | Virtual University of Pakistan


266 Computer Science MCQs for NTS / PPSC

279 Software piracy badge theft copyrighting program duplication data alteration C
include
280 Authorization to piggybacking site licensing scavenging copy protection B
make multiple
software copies is
called
281 Secured waste, data security built-in license protection piracy detection A
auditor checks and software
applicat screening protection
all add
282 The weakest link in people in it harware password software A
any computer
system is the
283 A device that site license Torjan Horse host site surge protector D
prevents electrical
problems from
affecting data files
284 One form of build-in secured waste applicant user profiles auditor checks C
software protection screening
for data is
285 A clip-on antivirus active badge site license consortium B
indentification card
with an embedded
chip to signal its
wearer's location
286 An empty shell in restoration site cold site hot site hardware B
which a company
may embedded chip
to signal its wearer's
location
287 A progarm written the programmer no one the state the organization D
when the
programmer is
employed by an
organization is
owned by
288 Booting is a process user programs I/O files are a protion of the none of the above C
in which are bought in collected and operating system is
memory organized on loaded into memory
disk
289 The purpose of an convert program meet specific allow the operating make off-line B
application program written in high user needs system to control equipment run
is to level language to resources better better
machine level
language
290 A system is which transcation expert system management decision support A
activities aer processing information system system
processed as and system

Safi Khan | Virtual University of Pakistan


267 Computer Science MCQs for NTS / PPSC

when they occur is


called
291 Word processing, office electronic electronic industry none of the above A
electronic filing and automation typewriter
electronic mail are
part of
292 To be computer how to program how to use a what computers can how to repair a D
literate, it is not a computer computer and can't do computer
necessary for you to
know
293 Security protection internal locks and cables software all of these D
for personal components
computer includes
294 The secret words or biometric data data passwords private words C
number to be typed encryptions
in on a keyborad
before any activity
can take place are
called
295 Another name for vaccine worm Trojan Horse DES A
an antivirus
296 Another name for encypted copy protected public domain shareware C
free software software software software
297 A virus that bug worm vaccine bomb B
replicates itself is
called a
298 A program whose bug worm vaccine bomb D
sabotage depends
on certain condition
is called a
299 Equal to, less than logical locations subtraction arithmetic A
and greater than are operations operation
examples of
300 The term "Liveware" the physical the instruction the people none of the above C
in computer component that fed into a associated fed into a
terminology refers make up the computer for computer for
to entire computer processing the processing the
system computer computer hardware
hardware
301 An approach to CISC parallel serial processing CMOS B
increase speed os processing

Safi Khan | Virtual University of Pakistan

You might also like