Professional Documents
Culture Documents
www.vumultan.com
Published By
Safi Khan
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
_______ 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
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?
legible?
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
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______________.
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
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
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
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
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
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
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
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
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
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
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
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
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
_________ 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 ?
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
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
________________ 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
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
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
-------
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?
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
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
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
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
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
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
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
______ 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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
________ 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
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
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
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
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 _______
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
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
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
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
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
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
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
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
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
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
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 _________
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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