[go: up one dir, main page]

0% found this document useful (0 votes)
364 views36 pages

CSC 207

The document contains 16 questions about arrays, strings, and their related programming concepts. Each question has multiple choice answers with one answer labeled as correct. The questions cover topics like the definition of an array, accessing elements in arrays and strings, operations on arrays and strings like insertion and concatenation, and more.

Uploaded by

ade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
364 views36 pages

CSC 207

The document contains 16 questions about arrays, strings, and their related programming concepts. Each question has multiple choice answers with one answer labeled as correct. The questions cover topics like the definition of an array, accessing elements in arrays and strings, operations on arrays and strings like insertion and concatenation, and more.

Uploaded by

ade
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 36

ByKhali

dfrom CSCclass26
CSC207
PS:quest
ionswherearrangedchapt
erbychapt
er

*
*1.Whati
sanarr
ayinprogr
ammi ng?**
-A)Adat
astr
uctur
ethatst
oresheterogeneousdata.
-B)Adat
astr
uct
urethatst
oresnon-conti
guousmemor yl
ocati
ons.
-C)Adat
astr
uctur
ethatst
oreshomogenousdat aincontiguousmemor
ylocat
ions.
-D)Adat
astr
uctur
ethatst
oresdatainar andom order
.

*
*Answer
:C*
*

*
*2.Inanar r
ay,
whati
sthenameusedt
oref
erencet
hel
ocat
ionofanel
ement
?**
-A)Offset
-B)Address
-C)Index
-D)Pointer

*
*Answer
:C*
*

*
*3.Whati
sthet
imecompl
exi
tyf
ori
nser
ti
nganel
ementi
nanar
raywi
th'
n'el
ement
s?*
*
-A)O(
logn)
-B)O(
n)
-C)O(
1)
-D)O(
nlogn)

*
*Answer
:B*
*

*
*4.Whichoper at
ional
l
owsy
out
opr
intal
ltheel
ement
sofanar
ray
,oneaf
teranot
her
?**
-A)Search
-B)Delete
-C)Traverse
-D)Update

*
*Answer
:C*
*

*
*5.Whati sanadv ant
ageofusi ngar
ray
s?*
*
-A)Dynami csizi
ng
-B)Ef
ficientel
ementr eading
-C)Hi
ghmemor yuti
li
zation
-D)Di
fficult
yinimplement at
ion

*
*Answer
:B*
*

*
*6.Whatisadisadvantageofusi
ngar
ray
s?*
*
-A)Fi
xedsize
-B)Eff
ici
entel
ementr eadi
ng
-C)Dynamicresiz
ing
-D)Lowmemor yuti
l
izati
on

*
*Answer
:A*
*

*
*7.Inaone-
dimensi
onal
arr
ay,
whati
sther
angeofar
rayi
ndi
ces?
**
-A)1toN
-B)0toN
-C)1t
oN-
1
-D)0t
oN-
1

*
*Answer
:D*
*

**
8.Whichdat
astruct
urei
sthef
oundat
ionofot
herdat
ast
ruct
uresl
i
keLi
nkedLi
st,
Stack,
and
Queue?
* *
-A)Array
-B)Tree
-C)Graph
-D)HashTable

*
*Answer
:A*
*

*
*9.Whati
sa2Dar ray?**
-A)Anar
raythatcontai
nstwoelements.
-B)Anar
raythatcontai
nstwotypesofdata.
-C)Anar
rayofarraysusedtor
epresentmatri
ces.
-D)Anar
rayofstri
ngs.

*
*Answer
:C*
*

*
*10.Howar eel
ementsaccessedi
na2Dar
rayusi
ngr
ow-
maj
oror
der
?**
-A)Traver
secolumnbycolumn
-B)Trav
erserowbyr ow
-C)Useahashf unct
ion
-D)Random access

**Answer
:B**
*
*11.Whatisastri
nginpr ogrammi ng?*
*
-A)Asequenceofi
nteger s.
-B)Adatastr
uct
ureusedf orst
oringchar
acters.
-C)Adatastr
uct
ureusedf orst
oringfl
oat
ing-poi
ntnumber
s.
-D)Acoll
ect
ionofobjects.

*
*Answer
:B*
*

*
*12.Whichoperati
oni
nst
ri
ngsi
susedt
ocombi
net
wost
ri
ngsi
ntoone?
**
-A)Merge
-B)Concat
enati
on
-C)Append
-D)Repl
ace

*
*Answer
:B*
*

*
*13.Whatisasubstri
ng?**
-A)Ast
ri
ngthatcontainsonl
ydigits.
-B)Ast
ri
ngwithspecialchar
acters.
-C)Ast
ri
ngthati
sasubsetofal argerst
ri
ng.
-D)Ast
ri
ngthatstart
swi t
hav owel.

*
*Answer
:C*
*

*
*14.Howcanyouaccessasubstri
ngi
nast
ri
ng?
**
-A)Usi
ngt
hestr
inglength
-B)Usi
ngt
heASCIIvalue
-C)Usi
ngt
heposit
ionandlengt
h
-D)Usi
ngal
oop

*
*Answer
:C*
*

*
*15.Whatistheresul
tofconcat
enat
ing"
Hel
l
o"and"
Wor
ld"i
nPy
thon?
**
-A)Hel
loWorl
d
-B)Hel
l
oWor ld
-C)Hel
loWorl
d
-D)Hel
lo-
World

*
*Answer
:A*
*

*
*16.Whati st het
ermf
orf
indi
ngt
heposi
ti
onofaspeci
fi
cpat
ter
nwi
thi
nast
ri
ng?
**
-A)Searching
-B)Traversi
ng
-C)Insert
ion
-D)Deleti
on

*
*Answer
:A*
*

**
17.Whi choperat
ionr
epl
acest
hef
ir
stoccur
renceofapat
ter
nwi
thanot
herpat
ter
nina
st
ring?
* *
-A)Search
-B)Traverse
-C)Insert
ion
-D)Replacement

*
*Answer
:D*
*

*
*18.Whati
stheresul
tofdel
eti
ng3char
act
ersst
art
ingf
rom posi
ti
on2i
nthest
ri
ng
"
ABCDEFG"?**
-A)"
ABC"
-B)"
ACDEFG"
-C)"
ABDEFG"
-D)"
ABCD"

*
*Answer
:B*
*

*
*19.Inst
ri
ngi
ndexi
ng,
whati
stheposi
ti
onoft
hef
ir
stchar
act
er?
**
-A)-
1
-B)0
-C)1
-D)2

*
*Answer
:B*
*

*
*20.Whichofthef
oll
owi ngstatementsaboutst
ri
ngsi
str
ue?
**
-A)St
ri
ngscanonlycontainlett
ers.
-B)St
ri
ngscan'
tcontainspaces.
-C)St
ri
ngscancontainlet
ters,numbers,
andsymbol
s.
-D)St
ri
ngscanonlybeoff i
xedl engt
h.

*
*Answer
:C*
*

*
*21.Whati
sthepur
poseofanar
rayi
ndexorsubscr
ipt
?**
-A)Tostorethedatainthearray
-B)Tospecif
yt hedat
at ypeofthear
ray
-C)Toaccesst hedat
awi thi
nthearr
ay
-D)Todeterminethesizeofthearr
ay

*
*Answer
:C*
*

**22.Whatist
heti
mecompl
exi
tyf
orsear
chi
nganel
ementi
nanar
rayofsi
ze'
n'usi
ngl
i
near
search?
**
-A)O(logn)
-B)O(n)
-C)O(1)
-D)O(nlogn)

*
*Answer
:B*
*

*
*23.Whi choperat
ioni
susedt
oupdat
eanel
ementatagi
veni
ndexi
nanar
ray
?**
-A)I
nsertion
-B)Deleti
on
-C)Searching
-D)Updating

*
*Answer
:D*
*

*
*24.Inatwo- di
mensional
arr
ay,
howar
eel
ement
saccessedusi
ngcol
umn-
maj
oror
der
?**
-A)Traver
secolumnbycolumn
-B)Trav
erserowbyr ow
-C)Useahashf uncti
on
-D)Random access

*
*Answer
:A*
*

*
*25.Whatisa3Dar ray?*
*
-A)Anar
raythatcontai
nst hreeelements.
-B)Anar
raythatstor
est hreetypesofdat a.
-C)Anar
rayofarraysusedt orepresentacube.
-D)Anar
rayofstri
ngswi ththreecharacterseach.

*
*Answer
:C*
*

*
*26.Whi choft
hefol l
owingstatementsi
strueaboutmul
ti
-di
mensi
onal
arr
ays?
**
-A)Theycanonlyhav etwodimensions.
-B)Theyarel
imitedtointegersonl
y.
-C)Theyarearr
ay sofarrays.
-D)Theyhaveafixedsize.

*
*Answer
:C*
*

**27.Whatist
heresul
tofconcat
enat
ing"
Hel
l
o"and"
Wor
ld"i
nJav
aScr
iptusi
ngt
he"
+"
operat
or?*
*
-A)Hell
oWorld
-B)Hell
oWor l
d
-C)Hell
oWorld
-D)Hell
o+World

*
*Answer
:B*
*
*
*28.Inst
ri
ngi
ndexi
ng,
whati
stheposi
ti
onoft
hel
astchar
act
er?
**
-A)-
1
-B)0
-C)1
-D)2

*
*Answer
:A*
*

**29.Whichoperat
ioni
susedt
odet
ermi
nei
fapat
ter
nexi
stswi
thi
nast
ri
ng,
butnoti
ts
posit
ion?**
-A)Searching
-B)Traversi
ng
-C)Insert
ion
-D)Deleti
on

*
*Answer
:A*
*

**30.Whatistheresultofrepl
aci
ngal loccur
rencesof"
cat
"wi
th"
dog"i
nthest
ri
ng"
Thecat
andthecatarefri
ends. "
?**
-A)"Thecatandt hecatarefri
ends."
-B)"Thedogandt hedogar efriends.
"
-C)"Thedogandt hecatarefr
iends."
-D)"Thedogandt hedogarefriends.
"

*
*Answer
:B*
*

**31.Whichoperat
ionr
emov
esaspeci
fi
cpat
ter
nfr
om ast
ri
ngwi
thoutr
epl
aci
ngi
twi
th
anythi
ng?**
-A)Search
-B)Traverse
-C)Deleti
on
-D)Replacement

*
*Answer
:C*
*

*
*32.Whatisthetermf
orast
ri
ngt
hathasnochar
act
ersandi
srepr
esent
edas"
"?*
*
-A)Nul
lstr
ing
-B)Emptystr
ing
-C)Voi
dstri
ng
-D)Bl
ankstri
ng

*
*Answer
:B*
*

*
*33.Whichoperati
onappendsast
ri
ngt
otheendofanot
herst
ri
ng?
**
-A)Merge
-B)Concat
enati
on
-C)Append
-D)Repl
ace

*
*Answer
:C*
*

*
*34.Whatisthemaxi
mum numberofdi
mensi
onsamul
ti
-di
mensi
onal
arr
aycanhav
e?*
*
-A)1
-B)2
-C)3
-D)Ther
eisnofi
xedli
mit
*
*Answer
:D*
*

*
*35.Whi chdat
ast
ruct
urer
epr
esent
sacol
l
ect
ionofkey
-val
uepai
rs?
**
-A)Array
-B)Stri
ng
-C)Dicti
onar
y
-D)Set

*
*Answer
:C*
*

*
*36.Whi choft
hefol
l
owi
ngi
sNOTacommonl
yuseddat
ast
ruct
urei
npr
ogr
ammi
ng?
**
-A)Li
nkedList
-B)Stack
-C)Loop
-D)Queue

*
*Answer
:C*
*

*
*37.Whati sthepri
mar yadvantageofusi
ngastackdat
ast
ruct
ure?
**
-A)Fastinser
ti
onanddel et
ionofelements
-B)Eff
ici
entsearchingofel ements
-C)Abil
it
yt ost
oreel ementsofdiff
erentdat
atypes
-D)Memor yeffi
ciency

*
*Answer
:A*
*

*
*38.Inaqueuedat astr
uctur
e,whichel
ementi
sremov
edf
ir
st?
**
-A)Theelementattheendofthequeue
-B)Theelementatthefr
ontofthequeue
-C)Arandom element
-D)Thelargestel
ement

*
*Answer
:B*
*

*
*39.Whichdat
astr
uct
uref
oll
owst
he"
LastI
n,Fi
rstOut
"(LI
FO)pr
inci
ple?
**
-A)Queue
-B)Li
nkedLi
st
-C)St
ack
-D)Arr
ay

*
*Answer
:C*
*

*
*40.Whatist heprimarypurposeofalinkedl
istdat
ast
ruct
ure?
**
-A)Tost
or eelementsi nasort
edorder
-B)Topr
ov iderandom accesstoelements
-C)Toef
ficientl
yinsertanddel
eteelements
-D)Toal
locatememor yforanarr
ay

*
*Answer
:C*
*

**
41.Whi chdat
astr
uct
urei
susedt
orepr
esenthi
erar
chi
cal
rel
ati
onshi
psbet
ween
el
ements? *
*
-A)Tree
-B)Queue
-C)St
ack
-D)Li
nkedList
*
*Answer
:A*
*

*
*42.Whatisabinar
ytree?*
*
-A)At
reewit
ht wobranchesateachnode
-B)At
reewit
honlyonebr anchateachnode
-C)At
reewit
ht hr
eebranchesateachnode
-D)At
reewit
hnobr anches

*
*Answer
:A*
*

*
*43.Whati stheprimar yadvant
ageofusi
ngahasht
abl
edat
ast
ruct
ure?
**
-A)Eff
ici
entsor t
ingofelements
-B)Constant-
ti
meaccesst oelement
s
-C)Supportfordy namicresi
zi
ng
-D)Abil
it
ytost oreelementsinali
nkedl
ist

*
*Answer
:B*
*

*
*44.Inahashtabl
e,whati
sthet
ermf
ort
hef
unct
iont
hatmapskey
stoar
rayi
ndi
ces?
**
-A)Keymapping
-B)Hashi
ng
-C)I
ndexi
ng
-D)Sear
ching

*
*Answer
:B*
*

*
*45.Whati sthetermfortheprocessofconv
ert
ingadat
ast
ruct
urei
ntoasequenceofby
tes
f
orstorageort r
ansmissi
on?**
-A)Seri
ali
zation
-B)Deserial
i
zation
-C)Hashing
-D)Encrypti
on

*
*Answer
:A*
*

*
*46.Whichsor t
ingal
gor
it
hm hasanav
eraget
imecompl
exi
tyofO(
nlogn)
?**
-A)BubbleSort
-B)I
nserti
onSort
-C)QuickSort
-D)Sel
ection

Sor
t

*
*Answer
:C*
*

*
*47.Whatist hepurposeofr ecursi
oninprogr
amming?**
-A)Tooptimizecodef orspeed
-B)Toavoidusingloops
-C)Tosolveproblemsbybr eaki
ngthem i
ntosmal
ler
,si
mil
arsubpr
obl
ems
-D)Tocreateinf
init
eloops

*
*Answer
:C*
*

*
*48.Inobj
ect-
ori
ent
edpr ogramming,whatisencapsul
ati
on?**
-A)Thepr
ocessofhidi
ngi mplementat
iondetai
lsandexposi
ngani
nter
face
-B)Thepr
ocessofconv ert
ingdat
aintoobject
s
-C)Thepr
ocessofcreatinganewclass
-D)Thepr
ocessofi
nher
it
ance

*
*Answer
:A*
*

*
*49.Whi chpr ogrammi ngpar adi
gm emphasi
zest
heuseoff
unct
ionsormet
hodst
oper
for
m
t
asks?**
-A)Object-Orient
edPr ogrammi ng(OOP)
-B)Procedur alProgr
ammi ng
-C)Functional Pr
ogrammi ng( FP)
-D)LogicalPr ogr
ammi ng

*
*Answer
:B*
*

*
*50.Whati st
hepr i
marypurposeofexcept
ionhandl
i
ngi
npr
ogr
ammi
ng?
**
-A)Tocreatebugsinthecode
-B)Toterminatet
heprogram
-C)Tograceful
lyhandl
eandr ecov
erfr
om err
ors
-D)Tohideerrormessagesfrom t
heuser

**
Answer:
C**
St
ack
**
1.Whatisastacki
ncomput erscience?
**
-A)Ali
neardatast
ruct
ureforinserti
nganddelet
ingdat
afrom bot
hends.
-B)Adatastr
uctur
ethatall
owsr andom accesst
oelements.
-C)Adynamicdatastr
uctur
et hatgrowsandshri
nksautomati
call
y.
-D)Ali
neardatast
ruct
ureforinserti
nganddelet
ingdat
aatoneend.

*
*Answer
:D*
*

*
*2.Howar estackscommonlyusedincomput erpr
ogr
ammi
ng?
**
-A)Fordynamicmemor yal
locati
on.
-B)Forsort
ingelement
s.
-C)Forconverti
ngandeval
uatingexpressi
ons.
-D)Forstor
ingelement
sinar andom order
.

*
*Answer
:C*
*

*
*3.Inastack,whereareall
thei
nser
ti
onanddel
eti
onoper
ati
onsper
for
med?
**
-A)Atbothends.
-B)Int
hemi ddle.
-C)Atthebottom.
-D)Atoneend( thetop)
.

*
*Answer
:D*
*

*
* 4.Whati
sthet ermf orthepri
nci
plet
hatst
atest
hel
asti
tem addedt
oast
acki
sthef
ir
st
i
tem toberemov ed( LIFO)?**
-A)FIFO(First
-In-Fir
st-Out)
-B)FILO(First
-In-Last-Out)
-C)LOFO( Last-Out -
First-
Out)
-D)FILI(
First-
In-Last-I
n)

*
*Answer
:B*
*

*
*5.Whataret
hepri
maryoper
ati
onsper
for
medonast
ack?
**
-A)PushandPop
-B)AddandSubt
ract
-C)I
nser
tandDel
ete
-D)Fi
ndandRepl
ace

*
*Answer
:A*
*

*
*6.WhatdoesthePushoperati
ondoi nastack?
**
-A)Removesthetopelement.
-B)Readsthecont
entofthetopelement.
-C)Addsanewi t
em tothetopofthestack.
-D)Checksift
hestackisempty.

*
*Answer
:C*
*

*
*7.WhatdoesthePopoper at
iondoinastack?
**
-A)I
nsert
sanewi t
em atthet op.
-B)Readsthecont
entofthetopelement.
-C)Removesthebott
om element.
-D)Removesthemostrecentlyaddedel
ementfr
om t
het
op.

*
*Answer
:D*
*

*
*8.Whatisthepur poseofthePeekorTopoper at
ioni
nastack?
**
-A)Toi
nser tanelement .
-B)Toreadt hecontentofthebott
om element.
-C)Toreadt hecontentofthetopelementwit
houtmodi
fyi
ngit
.
-D)Tochecki ft
hest ackisful
l
.

*
*Answer
:C*
*

*
*9.Whenisastackconsi
deredtobeinOv
erf
lowst
ate?
**
-A)Wheniti
sempt y.
-B)Wheniti
sfull
.
-C)Whenitcont
ainsoneelement.
-D)Whenitcont
ainsonl
yinteger
s.

*
*Answer
:B*
*

*
*10.Whenisastackconsi
deredtobei
nUnder
fl
owst
ate?
**
-A)Wheni
tisempty.
-B)Wheni
tisful
l.
-C)Wheni
tcontai
nsoneelement.
-D)Wheni
tcontai
nsonlyi
nteger
s.

*
*Answer
:A*
*

*
*11.Whati st
hekeyfeat
ureofast ack-basedonLIFO( Last
-I
n-Fi
rst
-Out
)orFI
LO(
Fir
st-
In-
Last
-
Out )
?**
-A)El
ementsareremovedinrandom or der.
-B)El
ementsareremovedintheor dertheywereinsert
ed.
-C)El
ementsareremovedfrom themi ddleoft
hest ack.
-D)Element
sareremovedinreverseor der
.

*
*Answer
:B*
*

*
*12.Whichdat
astr
uct
urei
susedt
oimpl
ementast
acki
nmemor
y?*
*
-A)Li
nkedLi
st
-B)Tr
ee
-C)Arr
ay
-D)Queue

*
*Answer
:C*
*

*
*13.Whathappenst othesi
zeofastackwitheachPush(
)andPop(
)oper
ati
on?
**
-A)I
tremai nsthesame.
-B)I
tdecr easeswit
hPush()andi
ncreaseswithPop(
).
-C)I
tincreaseswithPush(
)anddecreaseswithPop(
).
-D)I
tfluctuatesr
andomly.

*
*Answer
:C*
*

*
*14.Inast
ack,howisthei
nsert
ionofel
ement svi
suali
zed?**
-A)Asel
ementsbei
nginser
tedrandomly.
-B)Asel
ementsbei
nginser
tedinthemiddle.
-C)Asel
ementsbei
nginser
tedatthebott
om- mostposit
ion.
-D)Asel
ementsbei
nginser
tedatthetop.

*
*Answer
:C*
*

*
*15.Whatisthepr
imar
yoper
ati
onf
orr
emov
ingel
ement
sfr
om ast
ack?
**
-A)Push
-B)Peek
-C)Pop
-D)I
nsert

*
*Answer
:C*
*

*
*16.Inastack,whathappenswhenanel ementi
spushedi
ntoi
t?*
*
-A)I
tbecomest hetopelement .
-B)I
tbecomest hebottom element.
-C)I
tisremovedfrom thestack.
-D)I
tisrepl
acedbyt helastelement
.

*
*Answer
:A*
*

*
*17.Whendoesthestackbecomef ul
lduri
ngi
nser
ti
on?
**
-A)Af
teri
nser
ti
ngthefirstel
ement .
-B)Af
teri
nser
ti
ngthesecondel ement.
-C)Af
teri
nser
ti
ngallavail
ableelements.
-D)Af
teri
nser
ti
ngthelastelement.

*
*Answer
:D*
*

*
*18.WhatistheprimarypurposeofthePopoperati
oni
nast
ack?
**
-A)Tocheckift
hest acki
sempt y.
-B)Toreadthecontentofthetopelement.
-C)Toremov et
hemostr ecentl
yaddedelement.
-D)Toi
nsertanelementintothestack.

*
*Answer
:C*
*

*
*19.Whatistheresul
tofper
for
mingPopoper
ati
ononaf
ull
stackoneel
ementatat
ime?
**
-A)Thest
ackbecomesempt y.
-B)Thest
ackbecomesf ul
l
.
-C)Thest
ackremainsthesame.
-D)Theoper
ati
oni
snotpossi
ble.

*
*Answer
:A*
*

**
20.Whatist helastelementlefti
nthest
ackaf
terper
for
mingaser
iesofPopoper
ati
onson
afull
stack?
* *
-A)Thefi
rstelementi nsert
ed.
-B)Theelementatt hebot t
om.
-C)Theelementatt het op.
-D)Theelementi nthemi ddl
e.

*
*Answer
:A*
*

*
*21.Whatdatast
ruct
urecanbeusedt
oimpl
ementast
acki
nmemor
y?*
*
-A)Li
nkedLi
st
-B)Tr
ee
-C)Ar
ray
-D)Gr
aph

*
*Answer
:C*
*

*
*22.Inthecont extofst
acks,whatdoesLI
FOst
andf
or?
**
-A)Last-I
n-Fi
rst-
Out
-B)Latest-
Input-
Fir
st-
Output
-C)Least-I
ncome-

Fi
rst
-Out
-D)Last-
In-
Fir
st-
Over

*
*Answer
:A*
*

*
*23.Inthecont extofstacks,
whatdoesFI
LOst
andf
or?
**
-A)Fir
st-
In-Last-Out
-B)Fast-
Input-Last-
Output
-C)Full
-I
nput-Last-Out
-D)Fir
st-
In-Last-Over

*
*Answer
:A*
*

*
*24.Whati sthepri
maryfeatur
eofast ackthatdist
ingui
shesi
tfrom ot
herdat
ast
ruct
ures?
**
-A)Abil
it
ytoperfor
mr andom access.
-B)Abil
i
tytostoreel
ement sofdif
ferentdataty
pes.
-C)Last-
In-
Fir
st-
Out(LI
FO)orFirst-
In-Last
-Out(FI
LO)behavi
or.
-D)Fi
xedsize.

*
*Answer
:C*
*

*
*25.Whichoperat
ional
l
owsy
out
oreadt
hecont
entoft
het
opel
ementi
nast
ackwi
thout
r
emov i
ngit?
**
-A)PeekorTop
-B)Push
-C)Pop
-D)I
nsert

*
*Answer
:A*
*

*
*26.Whati
sthepr
imar
ypur
poseoft
hei
sFul
loper
ati
oni
nast
ack?
**
-A)Toaddanelementtothestack.
-B)Toreadthecont
entofthetopel
ement
.
-C)Tocheckift
hestacki
sempt y.
-D)Tocheckift
hestacki
sf ul
l
.

*
*Answer
:D*
*

*
*27.Whatistheprimarypurposeofthei
sEmpt
yoper
ati
oni
nast
ack?
**
-A)Toaddanelementt othestack.
-B)Toreadthecontentofthetopel
ement
.
-C)Tocheckift
hest acki
sempt y.
-D)Tocheckift
hest acki
sf ul
l
.

*
*Answer
:C*
*

*
*28.Whichoper
ati
oni
susedt
oinser
tanel
ementi
nast
ack?
**
-A)Push
-B)Pop
-C)Peek
-D)i
sFul
l

*
*Answer
:A*
*

*
*29.Whichoper
ati
oni
susedt
oremov
eanel
ementf
rom ast
ack?
**
-A)Push
-B)Pop
-C)Peek
-D)i
sFul
l

*
*Answer
:B*
*

*
*30.Whathappenst othesi
zeofast
ackaf
teraPush(
)oper
ati
on?
**
-A)I
tremai nsthesame.
-B)I
tdecr eases.
-C)I
tincreases.
-D)I
tfluctuatesrandoml
y.

*
*Answer
:C*
*

*
*31.Whathappenst othesi
zeofast
ackaf
teraPop(
)oper
ati
on?
**
-A)I
tremai nsthesame.
-B)I
tdecr eases.
-C)I
tincreases.
-D)I
tfluctuatesrandoml
y.

*
*Answer
:B*
*

*
*32.Whatistheresultofper
for
mi ngaPop(
)oper
ati
ononanempt
yst
ack?
**
-A)Thest
ackbecomesf ul
l
.
-B)Thest
ackbecomesempt y.
-C)Thest
ackremai nsthesame.
-D)Theoperat
ionisnotpossi
ble.

*
*Answer
:D*
*

**
33.Whati
sthelastel
ementl
efti
nthest
ackaf
terper
for
mingaser
iesofPushoper
ati
onson
anempt
ystack?
**
-A)Thefi
rstel
ementi
nsert
ed.
-B)Theel
ementatthebott
om.
-C)Theel
ementatthetop.
-D)Theel
ementinthemiddl
e.

*
*Answer
:C*
*

*
*34.Inthecontextofst
acks,whatist
heter
mforasi
tuat
ionwher
eanel
ementi
spushed
i
ntothestack,butt
hestackisal
readyful
l
?**
-A)Overfl
ow
-B)Underfl
ow
-C)Stackup
-D)Pi
leup

*
*Answer
:A*
*

*
*35.Inthecontextofst
acks,
whatisthet
ermforasi
tuat
ionwher
eanel
ementi
spopped
f
rom thestack,butt
hestacki
sal
readyempty
?**
-A)Overfl
ow
-B)Underfl
ow
-C)Stackup
-D)Pil
eup

*
*Answer
:B*
*

*
*36.Whatdatast
ruct
urei
scommonl
yusedt
oimpl
ementast
ack?
**
-A)Queue
-B)Tr
ee
-C)Li
nkedLi
st
-D)Graph

*
*Answer
:C*
*

**37.Whatistheprimaryfeatur
eofast ackthatal
lowsitt
obeusedf
orexpr
essi
onev
aluat
ion
andconversi
on?**
-A)Abil
it
ytoper f
ormr andom access.
-B)Abil
i
tytostoreelement sofdif
ferentdat
atypes.
-C)LI
FO( Last-
In-
Fir
st-Out)orFI
LO( Fir
st-
In-
Last
-Out
)behav
ior
.
-D)Fi
xedsize.

*
*Answer
:C*
*

*
*38.Inastack,wherei
sthemostr
ecent
lyaddedel
ementl
ocat
ed?
**
-A)Atthebottom.
-B)I
nthemi ddle.
-C)Atthetop.
-D)Atbothends.

*
*Answer
:C*
*

*
*39.Whatisthepr
imar
yoper
ati
onusedt
oremov
eanel
ementf
rom ast
ack?
**
-A)Push
-B)Peek
-C)Pop
-D)I
nsert

*
*Answer
:C*
*
*
*40.Inthecont extofstacks,
whatdoesFI
FOst
andf
or?
**
-A)Fir
st-
In-Fi
rst-
Out
-B)Fast-
Input-Fi
rst
-Output
-C)Full
-I
nput-
Fi r
st-
Out
-D)Fir
st-
In-Fi
rst-
Over

*
*Answer
:A*
*

*
*41.Inthecont extofstacks,
whatdoesLOFOst
andf
or?
**
-A)Last-Out-
First-
Out
-B)Latest-
Output -
Fir
st-
Out
-C)Least-Out-
First-
Out
-D)Last-Out-
First-
Over

*
*Answer
:A*
*

*
*42.Whatisthet
ermf
ort
hepr
ocessofr
emov
inganel
ementf
rom ast
ack?
**
-A)Push
-B)Peek
-C)Pop
-D)I
nsert

*
*Answer
:C*
*

*
*43.Whatistheprimarypur
poseofthei
sFul
loper
ati
oni
nast
ack?
**
-A)Toaddanelementt ot
hestack.
-B)Toreadthecontent

oft
hetopelement
.
-C)Tocheckift
hest
acki
sempty
.
-D)Tocheckift
hest
acki
sful
l
.

*
*Answer
:D*
*

*
*44.Whatistheprimarypurposeofthei
sEmpt
yoper
ati
oni
nast
ack?
**
-A)Toaddanelementt othestack.
-B)Toreadthecontentofthetopel
ement
.
-C)Tocheckift
hest acki
sempt y.
-D)Tocheckift
hest acki
sf ul
l
.

*
*Answer
:C*
*

*
*45.Whichoper
ati
oni
susedt
oinser
tanel
ementi
nast
ack?
**
-A)Push
-B)Pop
-C)Peek
-D)i
sFul
l

*
*Answer
:A*
*

*
*46.Whichoper
ati
oni
susedt
oremov
eanel
ementf
rom ast
ack?
**
-A)Push
-B)Pop
-C)Peek
-D)i
sFul
l
*
*Answer
:B*
*

*
*47.Whathappenst othesi
zeofast
ackaf
teraPush(
)oper
ati
on?
**
-A)I
tremai nsthesame.
-B)I
tdecr eases.
-C)I
tincreases.
-D)I
tfluctuatesrandoml
y.

*
*Answer
:C*
*

*
*48.Whathappenst othesi
zeofast
ackaf
teraPop(
)oper
ati
on?
**
-A)I
tremai nsthesame.
-B)I
tdecr eases.
-C)I
tincreases.
-D)I
tfluctuatesrandoml
y.

*
*Answer
:B*
*

*
*49.Whatistheresultofper
for
mi ngaPop(
)oper
ati
ononanempt
yst
ack?
**
-A)Thest
ackbecomesf ul
l
.
-B)Thest
ackbecomesempt y.
-C)Thest
ackremai nsthesame.
-D)Theoperat
ionisnotpossi
ble.

*
*Answer
:D*
*

**
50.Whatisthelastelementlefti
nthest
ackaf
terper
for
mingaser
iesofPushoper
ati
onson
anempt yst
ack?**
-A)Thefi
rstel
ementi nsert
ed.
-B)Theelementatthebot t
om.
-C)Theelementatthet op.
-D)Theelementinthemi ddl
e.

**Answer:C**
Que
**
1.Whati saqueuei ndatastruct
ur e?**
-A)Alineardatastr
uctur
ef orstoringdat ai
ncont
iguousmemor ylocat
ions.
-B)Alinearl
istfori
nsert
inganddel eti
ngelement
sfrom bothends.
-C)Alinearl
istfori
nsert
ingelement satoneendanddeleti
ngelementsfrom t
heot
herend.
-D)At ypeofli
nkedli
stforeffi
cientsear chi
ng.

*
*Answer
:C*
*

*
*2.Whichendofaqueuei susedf
ori
nser
ti
ngel
ement
s?*
*
-A)Front
-B)Rear
-C)Middl
e
-D)Bothfrontandr
ear

*
*Answer
:B*
*

**3.Whatistheterm usedt
odescr
ibet
heendofaqueuewher
edel
eti
onofanel
ement
occurs?
**
-A)Front
-B)Rear
-C)Middle
-D)Bothfrontandrear
*
*Answer
:A*
*

*
*4.Howcanaqueuebei mplementedi
ndat
ast
ruct
ure?
**
-A)Usi
ngali
nkedlistonl
y
-B)Usi
nganarrayonly
-C)Usi
ngbot
hanar r
ayandalinkedl
i
st
-D)Usi
ngastack

*
*Answer
:C*
*

*
*5.Whatdatastr
uct
urei
scommonl
yusedt
oimpl
ementaqueue?
**
-A)St
ack
-B)Li
nkedl
ist
-C)Ar
ray
-D)Bi
naryt
ree

*
*Answer
:C*
*

*
*6.Whatprinci
pledoesaqueuef
oll
owi
nter
msofel
ementi
nser
ti
onanddel
eti
on?
**
-A)LastI
nFir
stOut(LI
FO)
-B)Fi
rstI
nFir
stOut(FI
FO)
-C)LastI
nLastOut(LI
LO)
-D)Fi
rstI
nLastOut(FI
LO)

*
*Answer
:B*
*

*
*7.Inaqueue,
whichelementwi l
lbeservedf
ir
st?
**
-A)Theel
ementwit
ht hehighestpr
ior
it
y
-B)Theel
ementwit
ht helowestpri
ori
ty
-C)Theel
ementatt
hef ront
-D)Theel
ementatt
her ear

*
*Answer
:C*
*

*
*8.Whatisthepri
marypurposeoft heEnqueueoper
ati
oni
naqueue?
**
-A)Toremoveanel
ementf rom thequeue
-B)Toreadt
hecontentofthefrontel
ement
-C)Toaddanelementtothefrontofthequeue
-D)Toaddanelementtothebackoft hequeue

*
*Answer
:D*
*

*
*9.Whatisthepri
marypurposeoft heDequeueoper
ati
oni
naqueue?
**
-A)Toremoveanel
ementf rom thequeue
-B)Toreadt
hecontentofthefrontel
ement
-C)Toaddanelementtothefrontofthequeue
-D)Toaddanelementtothebackoft hequeue

*
*Answer
:A*
*

*
*10.Whatdoest heFrontoperat
ioninaqueuedo?**
-A)Remov esthef r
ontelementfr
om thequeue.
-B)Addsanel ementt othefr
ontofthequeue.
-C)Retur
nst hefrontelementwit
houtremovingi
t.
-D)Checksifthequeuei sempty.
*
*Answer
:C*
*

*
*11.Whatisthepr i
marypurposeoft heI sEmpt
yoper
ati
oni
naqueue?
**
-A)Toremov eanelementfrom thequeue
-B)Toreadthecontentofthefrontelement
-C)Tocheckifthequeueisempt y
-D)Toaddanel ementtothefrontoft hequeue

*
*Answer
:C*
*

*
*12.Whatisthepr i
marypurposeoft heI sFul
loper
ati
oni
naqueue?
**
-A)Toremov eanelementfrom thequeue
-B)Toreadthecontentofthefrontelement
-C)Tocheckifthequeueisful
l
-D)Toaddanel ementtothefrontoft hequeue

*
*Answer
:C*
*

*
*13.Whichtypeofqueueall
owsel
ement
stobeaddedandr
emov
edf
rom bot
hends?
**
-A)Si
mpleQueue
-B)Ci
rcul
arQueue
-C)Pri
ori
tyQueue
-D)Doubl
e-endedQueue

*
*Answer
:D*
*

*
*14.Whatisthespeci
alfeat
ureofacir
cularqueuecompar edtoasimplequeue?**
-A)Ci
rcul
arqueueal
lowselementstobeinsert
edatt herearonl
y.
-B)Ci
rcul
arqueueal
lowselement
stober emov edfrom t
hef r
ontonly.
-C)Ci
rcul
arqueueal
lowselementstobeaddedandr emovedfrom bothends.
-D)Ci
rcul
arqueuedoesnotall
owinsert
ionordelet
ion.

*
*Answer
:C*
*

*
*15.Whatisthepri
marypurposeoft heEnqueueoperati
oni
naci
rcul
arqueue?
**
-A)Toaddanelementtothefrontoft hequeue
-B)Toaddanelementtotherearofthequeue
-C)Toremoveanelementfrom thefrontofthequeue
-D)Toremoveanelementfrom therearofthequeue

*
*Answer
:B*
*

*
*16.Whatisthepri
marypur
poseoft
heDequeueoper
ati
oni
naci
rcul
arqueue?
**
-A)Toaddanelementtot
hefr
ontoft
hequeue
-

B)Toaddanel
ementtot
herearofthequeue
-C)Toremov
eanelementf
rom thefrontofthequeue
-D)Toremov
eanelementf
rom therearofthequeue

*
*Answer
:C*
*

*
*17.Whatisapriori
tyqueuebasedon?
**
-A)El
ement
s'inserti
onorder
-B)El
ement
s'alphabeti
calor
der
-C)El
ement
s'priori
ty
-D)El
ement
s'size
*
*Answer
:C*
*

*
*18.Inapri
ori
tyqueue,
whi chelementisdequeuedf
ir
st?
**
-A)Theel
ementwiththehighestpri
ori
ty
-B)Theel
ementwiththelowestpri
orit
y
-C)Theel
ementatthefront
-D)Theel
ementattherear

*
*Answer
:A*
*

*
*19.Whatar ethetwot ypesofpr
ior
it
yqueuesment i
onedinthet
ext
?**
-A)Si
mpl ePrior
it
yQueueandDoubl e-
endedPri
orit
yQueue
-B)AscendingPrior
it
yQueueandDescendingPrior
ityQueue
-C)Li
nearPr i
ori
tyQueueandCircul
arPri
ori
tyQueue
-D)Pri
ori
tyPrior
ityQueueandNon-Pri
ori
tyQueue

*
*Answer
:B*
*

*
*20.Whatisaci r
cul
arqueueal
soknownas?
**
-A)Doubl
e-endedqueue
-B)Pr
iori
tyqueue
-C)St
andardqueue
-D)Ri
ngbuf f
er

*
*Answer
:D*
*

**
21.Whichdat ast
ruct
ureal
l
owsf
orbet
termemor
yut
il
izat
ionwhent
hequeuehasaf
ixed
si
ze?**
-A)Si
mpleQueue
-B)Pri
ori
tyQueue
-C)Ci
rcul
arQueue
-D)Double-
endedQueue

*
*Answer
:C*
*

**22.Whati
sthepri
marypurposeoft heInser
tElementsatFr
ontoper
ati
oni
naci
rcul
ar
queue?*
*
-A)Toaddanelementtotherearofthequeue
-B)Toaddanelementtothefrontofthequeue
-C)Toremoveanelementfrom therearofthequeue
-D)Toremoveanelementfrom thefrontofthequeue

*
*Answer
:B*
*

*
*23.Howist helastelementofaci
rcul
arqueueconnect
edt
othef
ir
stel
ement
?**
-A)Byal
inkedl i
st
-B)Byabinarytree
-C)Byacircul
arconnecti
on
-D)Byastack

*
*Answer
:C*
*

*
*24.Whatisadouble-
endedqueueal
soknownas?
**
-A)Pr
iori
tyqueue
-B)St
andardqueue
-C)Ci
rcul
arqueue
-D)Deque

*
*Answer
:D*
*

*
*25.Whichoperati
oni nadouble-
endedqueueal
l
owsi
nser
ti
ngani
tem f
rom t
her
earend?
**
-A)I
nsertEl
ement satFront
-B)I
nser
tElement satBack
-C)Del
eteFir
stElement
-D)Del
eteLastEl
ement

*
*Answer
:B*
*

*
*26.Whichoperati
oni nadouble-
endedqueueal
l
owsdel
eti
ngani
tem f
rom t
hef
rontend?
**
-A)I
nsertEl
ement satFront
-B)I
nser
tElement satBack
-C)Del
eteFir
stElement
-D)Del
eteLastEl
ement

*
*Answer
:C*
*

*
*27.Inwhichscenar i
oisapriorit
yqueueusedwi
thi
nacomput
ersy
stem?
**
-A)Forprintingjobsi nr
andom or der
-B)Forkey boardi nput
-C)Forstor i
ngt asksintheor dert
heyar
ecreat
ed
-D)Foraccessi ngt hediskstorage

*
*Answer
:A*
*

*
*28.Whati sthepr i
maryappli
cationofadoubl
e-endedqueue(
deque)
?**
-A)Undooper ati
onsinsoftware
-B)Stori
nghistoryinbrowsers
-C)Print
ingjobsinorderofpri
or i
ty
-D)Implement i
ngstackoperati
ons

*
*Answer
:A*
*

*
*29.Whi chalgorit
hm usesapri
ori
tyqueuef
orf
indi
ngt
heshor
testpat
hinagr
aph?
**
-A)Breadth-
FirstSearch(
BFS)
-B)Depth-Fi
rstSearch(DFS)
-C)Dij
kstra'
sshor t
estpat
halgor
it
hm
-D)Kruskal'
salgori
thm

*
*Answer
:C*
*

**30.I
nacircul
arqueue,whathappenswhent heendpoi
nterr
eachest
hel
astel
ementanda
newi t
em i
sadded?**
-A)Thenewi t
em repl
acesthelastelement
.
-B)Thequeuebecomesempt y
.
-C)Theendpointermovestothef i
rstel
ement.
-D)Thequeuebecomesf ull
.

*
*Answer
:C*
*

*
*31.Whatist hepri
mar yappl
i
cat
ionofapr
ior
it
yqueuei
noper
ati
ngsy
stems?
**
-A)Handl
inginter
rupts
-B)Managingfil
esystems
-C)Runni
nguserpr ograms
-D)Al
l
ocat
ingmemor
y

*
*Answer
:A*
*

*
*32.Whichofthefoll
owi
ngi
sNOTat
ypeofqueuement
ionedi
nthet
ext
?**
-A)Si
mpleQueue
-B)Pr
iori
tyQueue
-C)Li
nearQueue
-D)Ci
rcul
arQueue

*
*Answer
:C*
*

*
*33.Inadescendi
ngorderprior
it
yqueue, whi
chel
ementi
sgi
vent
hehi
ghestpr
ior
it
y?*
*
-A)Theel
ementwit
ht helowestvalue
-B)Theel
ementwit
ht hehighestvalue
-C)Theel
ementatt
hef ront
-D)Theel
ementattherear

*
*Answer
:B*
*

*
*34.Whatisthepri
marypurposeoft heSizeoperat
ioni
naqueue?
**
-A)Toaddanelementtothefrontoft hequeue
-B)Toaddanelementtotherearoft hequeue
-C)Toremoveanelementfrom thefrontofthequeue
-D)Toret
urnthenumberofelement sinthequeue

*
*Answer
:D*
*

*
*35.Whatisastandardqueuebasedon?
**
-A)El
ement
s'insert
ionorder
-B)El
ement
s'alphabeti
calor
der
-C)El
ement
s'prior
it
y
-D)El
ement
s'size

*
*Answer
:A*
*

*
*36.Inaprior
it
yqueue,whathappenswhent woel ement
shav
ethesamepr
ior
it
y?*
*
-A)Theelementwitht
helowerv alueisdequeuedfir
st.
-B)Theelementwitht
hehigherv aluei
sdequeuedf i
rst
.
-C)Theyaredequeuedint
heor deroft hei
rar
riv
al.
-D)Theyarebothremovedfrom thequeue.

*
*Answer
:C*
*

*
*37.Whichoperati
oni nadouble-
endedqueueal
l
owsi
nser
ti
ngani
tem f
rom t
hef
rontend?
**
-A)I
nsertEl
ement satFront
-B)I
nser
tElement satBack
-C)Del
eteFir
stElement
-D)Del
eteLastEl
ement

*
*Answer
:A*
*

**38.Whatdoesaci r
cularqueueal
l
owf
orbet
termemor
yut
il
izat
ioncompar
edt
oasi
mpl
e
queue?**
-A)Reusingvacantspaces
-B)Remov i
ngempt yspaces
-C)Incr
easingthequeuesize
-D)Reduci
ngt
hequeuesi
ze

*
*Answer
:A*
*

*
*39.Inaci
rcul
arqueue,whatistheroleoftheheadpoi
nter
?**
-A)I
tpoi
ntst
otherearofthequeue.
-B)I
tpoi
ntst
othemi ddleofthequeue.
-C)I
tpoi
ntst
othefrontofthequeue.
-D)I
tpoi
ntst
othef i
rstel
ementoft hequeue.

*
*Answer
:C*
*

*
*40.Whati
sadoubl
e-endedqueue(
deque)of
tenabbr
evi
atedas?

*
*
-A)DEC
-B)DEQUE
-C)DQ
-D)DEQ

*
*Answer
:B*
*

**41.Whatoperat
ioni
sperformedwhent heDequeueoper
ati
oni
sexecut
edi
naci
rcul
ar
queue?*
*
-A)Addinganelementt
ot hefrontofthequeue
-B)Addinganelementt
ot herearofthequeue
-C)Remov i
nganelementfrom thefrontofthequeue
-D)Remov i
nganelementfrom therearofthequeue

*
*Answer
:C*
*

*
*42.Whati sthepr i
maryappli
cati
onofadoubl
e-endedqueue(
deque)
?**
-A)Undooper ati
onsinsoftware
-B)Stori
nghistoryinbrowser
s
-C)Print
ingjobsinorderofpri
ori
ty
-D)Implement i
ngbothstacksandqueues

*
*Answer
:D*
*

**43.Whati
sthepri
marypurposeoft heInser
tElementsatBackoper
ati
oni
naci
rcul
ar
queue?*
*
-A)Toaddanelementtotherearofthequeue
-B)Toaddanelementtothefrontofthequeue
-C)Toremoveanelementfrom therearofthequeue
-D)Toremoveanelementfrom thefrontofthequeue

*
*Answer
:A*
*

*
*44.Whati sastandardqueuepri
mari
lyusedf
ori
ncomput
ersy
stems?
**
-A)St
oringtaskstobeexecutedi
nturn
-B)Managingfil
esystems
-C)Al
locati
ngmemor y
-D)Handli
nginter
rupts

*
*Answer
:A*
*

*
*45.I
nadescendi
ngor
derpr
ior
it
yqueue,
whi
chel
ementhast
hehi
ghestpr
ior
it
y?*
*
-A)Theel
ementwit
hthelowestvalue
-B)Theel
ementwit
hthehighestvalue
-C)Theel
ementatt
hefront
-D)Theel
ementatt
herear

*
*Answer
:B*
*

*
*46.Whatisthepri
marypurposeoft heFrontoperat
ioni
nadoubl
e-endedqueue(
deque)
?**
-A)Toaddanelementtothefrontofthedeque
-B)Toaddanelementtotherearofthedeque
-C)Toret
urnthefr
ontel
ementwi thoutr
emov ingit
-D)Tocheckift
hedequeisempt y

*
*Answer
:C*
*

**47.Whatist
hepri
marypurposeoft heDeleteLastEl
ementoper
ati
oni
nadoubl
e-ended
queue(deque)
?**
-A)Toaddanelementtothefrontoft hedeque
-B)Toaddanelementtotherearofthedeque
-C)Toremoveanelementfrom thefrontofthedeque
-D)Toremoveanelementfrom therearofthedeque

*
*Answer
:D*
*

*
*48.Whatistheprimaryappl
i
cat
ionofapr
ior
it
yqueuei
ndat
acompr
essi
ont
echni
ques?
**
-A)Undooperati
ons
-B)St
ori
nghistory
-C)Huff
mancode
-D)Heapsort

*
*Answer
:C*
*

**
49.Inadescendingorderpriori
tyqueue, whathappenswhent
woel
ement
shav
ethesame
pr
iori
ty?
**
-A)Theelementwiththelowerv alueisdequeuedfir
st.
-B)Theelementwiththehigherv aluei
sdequeuedf i
rst
.
-C)Theyaredequeuedintheor deroft hei
rarr
ival
.
-D)Theyarebothremov edfrom thequeue.

*
*Answer
:C*
*

*
*50.Whati sastandardqueuepri
mari
lyusedf
ori
ncomput
ersy
stems?
**
-A)St
oringtaskstobeexecutedi
nturn
-B)Managingfil
esystems
-C)Al
locati
ngmemor y
-D)Handli
nginter
rupts

**Answer:A**
Tree
**1.Whatistheprimarydif
ferencebet
weenar
eal
-wor
ldt
reeandat
reei
nthecomput
ing
fi
eld?**
-A)Thedi rect
ionofbranches
-B)Thepr esenceofleaves
-C)Thenumberofr oots
-D)Theshapeoft hetr
unk

*
*Answer
:A*
*
*
*2.Whatisat r
eedat astructur
eof
tenusedt
odemonst
rat
e?*
*
-A)Sort
ingalgori
thms
-B)Par
ent-chi
ldrelat
ionships
-C)Geographical
locati
ons
-D)Hardwarecomponent s

*
*Answer
:B*
*

*
*3.Whatisahi erarchi
caldat
ast
ruct
ureof
tenr
efer
redt
oas?
**
-A)Li
nearst r
ucture
-B)Ci
rcularstructure
-C)Hier
archicstructure
-D)Compl exstructure

*
*Answer
:C*
*

*
*4.Whichoper at
iondoesat
reedat
ast
ruct
urepr
imar
il
ysi
mpl
i
fyandspeedup?
**
-A)I
nsertion
-B)Deleti
on
-C)Searching
-D)Traversal

*
*Answer
:C*
*

*
*5.Whatisat r
eeprimar
il
yar
epr
esent
ati
onofi
ndat
ast
ruct
ures?
**
-A)Li
neardata
-B)Non-l
ineardata
-C)Sequenti
aldata
-D)Cir
culardata

*
*Answer
:B*
*

*
*6.Whattypesofdat astr
uctur
escanbeusedt
oimpl
ementat
ree?
**
-A)Ar
raysonl y
-B)Li
nkedlistsonly
-C)Ar
rays,classes,andl
inkedli
sts
-D)St
acksandqueues

*
*Answer
:C*
*

*
*7.Whati
st herootofatree?**
-A)Thel
eafnodewi ththelowestvalue
-B)Thefi
rstnodefrom wherethetreeori
ginat
es
-C)Thenodewi t
hthemostchi l
dren
-D)Thenodewi t
hthehighestdegree

*
*Answer
:B*
*

*
*8.Whatisanedgei natr
ee?**
-A)Therootnode
-B)Abranchconnecti
ngt wonodes
-C)Aleafnode
-D)Anon-li
nearconnect
ion

*
*Answer
:B*
*
*
*9.Whati
saparentnodeinat r
ee?**
-A)Anodewit
hthemostchi l
dren
-B)Anodet
hathasnobr anches
-C)Anodet
hatconnectstotherootnode
-D)Anodewit
hbranchesleadingt
oothernodes

*
*Answer
:D*
*

*
*10.Whatar enodeswi
tht
hesamepar
entcal
l
ed?
**
-A)Cousins
-B)Si
bli
ngs
-C)Off
spr i
ng
-D)Ancestors

*
*Answer
:B*
*

*
*11.Whatisthedegreeofanodei natree?**
-A)Thenumberofedgesl eadingtoi
t
-B)Thenumberofchi l
drenithas
-C)Thenumberofsi bl
ingsithas
-D)Theheightoft
hesubt reeroot
edatthatnode

*
*Answer
:B*
*

*
*12.Whati
sani nt
ernalnodeinatree?**
-A)Anodethathasnochi l
dren
-B)Anodethatconnectsdir
ectl
ytotheroot
-C)Anodethathasatleastonechild
-D)Anodethatcontai
nsonlyleaves

*
*Answer
:C*
*

*
*13.Whati
sal eafnodeinatree?**
-A)Anodewithnobr anches
-B)Anodewiththemostchi l
dren
-C)Anodethatconnectstotheroot
-D)Anodewiththehighestdegree

*
*Answer
:A*
*

*
*14.Whatist
heheightofanodei nat
ree?
**
-A)Thenumberoflevelsabov ei
t
-B)Thenumberofchildrenithas
-C)Thenumberofedgesl eadingtoi
t
-D)Thenumberofsiblingsi
thas

*
*Answer
:A*
*

*
*15.Whatist
hedepthofanodei natree?
**
-A)Thenumberoflevelsabov ei
t
-B)Thenumberofchildrenithas
-C)Thenumberofedgesl eadingtoi
t
-D)Thenumberofsiblingsi
thas

*
*Answer
:A*
*

*
*16.Whatdoesasubt
reeconsi
stofi
nat
ree?
**
-A)Allt
henodesinthetree
-B)Al
l t
heleafnodesi
nthet r
ee
-C)Everychi
ldfr
om anodeanditsdescendant
s
-D)Therootnodeanditsimmediat
echil
dren

*
*Answer
:C*
*

*
*17.Whatisaforestinthecontextoft
rees?
**
-A)Agroupoftallt
reesinaf or
est
-B)Acoll
ect
ionofdisjointt
rees
-C)Atypeoftr
eewi thbroadleaves
-D)Atr
eewithmanybr anches

*
*Answer
:B*
*

*
*18.Whi
choft
hef
oll
owi
ngi
sNOTat
ypeoft
reement
ionedi
nthet
ext
?**
-A

)Gener
al Tree
-B)Bi
nar yTree
-C)BinarySearchTr
ee
-D)TernaryTree

*
*Answer
:D*
*

*
*19.I
naBi
nar
yTr
ee,
howmanychi
l
drencaneachnodehav
eatmost
?**
-A)0
-B)1
-C)2
-D)3

*
*Answer
:C*
*

*
*20.Whatty peoft r
eei
sasuper
-setofal
lot
hert
reet
ypes?
**
-A)Bi
naryTr ee
-B)General Tree
-C)AVLTr ee
-D)Red-Bl
ackTr ee

*
*Answer
:B*
*

*
*21.WhatisthepurposeofI norderTr
aversali
naBinar
ySear
chTr
ee?
**
-A)Tocreat
eacopyoft het r
ee
-B)Todelet
ethetree
-C)Togettheprefi
xexpr essi
onofanex pressi
ontr
ee
-D)Togettheinf
ixexpressionofanex pr
essiontr
ee

*
*Answer
:D*
*

*
*22.WhatistheprimaryadvantageofusingB-
Treesf
orl
argedat
aset
s?*
*
-A)Ef
fici
entinser
ti
onanddel eti
onoperati
ons
-B)Minimalmemor yusage
-C)Quicksequenti
alaccess
-D)Guarant
eedbalanceofthet ree

*
*Answer
:A*
*
*
*23.I
nB-Trees,whathappenswhenanodebecomesf ul
ldur
ingi
nser
ti
on?
**
-A)Thenodeisspliti
ntotwonodes
-B)Thenodeismar kedasful
landl ef
tunchanged
-C)Thenode'schi
ldrenar
erearranged
-D)Thetr
eebecomesunbal anced

*
*Answer
:A*
*

*
*24.WhatisaB- Tr
ee'spri
mar yadvant
agewhendeal
i
ngwi
thl
argedat
aset
s?*
*
-A)Quickinser
ti
onofelement s
-B)Minimalmemor yusage
-C)Ef
fici
entsequenti
alaccess
-D)Guaranteedbal
anceoft hetree

*
*Answer
:C*
*

*
*25.I
naB-Tr ee,
whathappenswheny oudel
eteal
eafnode?
**
-A)Theparentnodebecomesal eafnode
-B)Theparentnodei
sdel et
edaswel l
-C)Theparentnode'
svalueisupdated
-D)Thetr
eebecomesunbal anced

*
*Answer
:B*
*

*
*26.Howmanychi
l
drenmustt
her
ootnodeofaB-
Treehav
e?*
*
-A)0
-B)1
-C)Atl
east2
-D)Atmost2

*
*Answer
:C*
*

*
*27.Whatisthemaximum numberofchi
l
drenanodecanhav
einaB-
Tree?
**
-A)0
-B)1
-C)Equalt
ot heor
deroft
hetree
-D)Unli
mit
ed

*
*Answer
:C*
*

*
*28.HowareB- Treeshelpfuli
ntermsofdat
abasesy
stems?
**
-A)Theyspeedupdat abasequer i
es
-B)Theyminimizestoragespace
-C)Theysi
mpl i
fydatar et
riev
al
-D)Theyel
iminatetheneedf orindexi
ng

*
*Answer
:A*
*

*
*29.Whatisthepri
marypur poseofInor
derTraver
sal i
naBi
nar
ySear
chTr
ee?
**
-A)Tocreat
eacopyoft het ree
-B)Todelet
ethetree
-C)Togettheprefi
xexpressionofanexpressi
ont r
ee
-D)Togettheinf
ixexpr
essi onofanexpressi
ontree

*
*Answer
:D*
*

*
*30.I
naB-
Tree,
whathappenswhenanodebecomesf
ull
dur
ingi
nser
ti
on?
**
-A)Thenodei
sspliti
ntot
wonodes
-B)Thenodei
smar kedasful
landl ef
tunchanged
-C)Thenode'
schi
ldrenar
erearranged
-D)Thetr
eebecomesunbalanced

*
*Answer
:A*
*

*
*31.WhatisaB- Tr
ee'spri
mar yadvant
agewhendeal
i
ngwi
thl
argedat
aset
s?*
*
-A)Quickinser
ti
onofelement s
-B)Minimalmemor yusage
-C)Ef
fici
entsequenti
alaccess
-D)Guaranteedbal
anceoft hetree

*
*Answer
:C*
*

*
*32.I
naB-Tr ee,
whathappenswheny oudel
eteal
eafnode?
**
-A)Theparentnodebecomesal eafnode
-B)Theparentnodei
sdel et
edaswel l
-C)Theparentnode'
svalueisupdated
-D)Thetr
eebecomesunbal anced

*
*Answer
:B*
*

*
*33.Howmanychi
l
drenmustt
her
ootnodeofaB-
Treehav
e?*
*
-A)0
-B)1
-C)Atl
east2
-D)Atmost2

*
*Answer
:C*
*

*
*34.Whatisthemaximum numberofchi
l
drenanodecanhav
einaB-
Tree?
**
-A)0
-B)1
-C)Equalt
ot heor
deroft
hetree
-D)Unli
mit
ed

*
*Answer
:C*
*

*
*35.HowareB- Treeshelpfuli
ntermsofdat
abasesy
stems?
**
-A)Theyspeedupdat abasequer i
es
-B)Theyminimizestoragespace
-C)Theysi
mpl i
fydatar et
riev
al
-D)Theyel
iminatetheneedf orindexi
ng

*
*Answer
:A*
*

*
*36.Whatisaforestinthecontextoft
rees?
**
-A)Agroupoftallt
reesinaf or
est
-B)Acoll
ect
ionofdisjointt
rees
-C)Atypeoftr
eewi thbroadleaves
-D)Atr
eewithmanybr anches

*
*Answer
:B*
*

*
*37.Whichoper
ati
ondoesat
reedat
ast
ruct
urepr
imar
il
ysi
mpl
i
fyandspeedup?
**
-A)I
nsert
ion
-B)Deleti
on
-C)Searching
-D)Traversal

*
*Answer
:C*
*

*
*38.Whatisat r
eepr i
mar
il
yar
epr
esent
ati
onofi
ndat
ast
ruct
ures?
**
-A)Li
neardata
-B)Non-l
ineardata
-C)Sequenti
aldata
-D)Cir
culardata

*
*Answer
:B*
*

*
*39.Whatty
pesofdat ast
ruct
urescanbeusedt
oimpl
ementat
ree?
**
-A)Ar
raysonly
-B)Li
nkedli
stsonly
-C)Ar
rays,
classes,andl
i
nkedlist
s
-D)St
acksandqueues

*
*Answer
:C*
*

*
*40.Whatistherootofatree?*
*
-A)Thel
eafnodewi ththelowestvalue
-B)Thefi
rstnodefrom wherethetreeori
ginat
es
-C)Thenodewi t
hthemostchi l
dren
-D)Thenodewi t
hthehighestdegree

*
*Answer
:B*
*

*
*41.Whatisanedgei natree?
**
-A)Therootnode
-B)Abranchconnectingtwonodes
-C)Aleafnode
-D)Anon-li
nearconnecti
on

*
*Answer
:B*
*

*
*42.Whati
sapar entnodeinat ree?**
-A)Anodewiththemostchi l
dren
-B)Anodethathasnobr anches
-C)Anodethatconnectstother ootnode
-D)Anodewithbranchesleadingtoot hernodes

*
*Answer
:D*
*

*
*43.Whatar
enodeswi
tht
hesamepar
entcal
l
ed?
**
-

A)Parents
-B)Sibl
i
ngs
-C)Chil
dren
-D)Leaves

*
*Answer
:B*
*

*
*44.Whati
sthedegr
eeofat
reenode?
**
-A)Thenumberofchil
drenanodehas
-B)Thenumberoflev
elsanodeisfr
om t
her
oot
-C)Theval
uestor
edinanode
-D)Thedept
hofanode

*
*Answer
:A*
*

*
*45.Whatisani nter
nalnodeinat r
ee?
**
-A)Anodet hatisnotconnectedtoanyot
hernodes
-B)Anodewi ththemostchildren
-C)Anodewi thatleastonechild
-D)Aleafnode

*
*Answer
:C*
*

*
*46.Whatisaleafnodeinatree?**
-A)Anodethatisnotconnectedtoanyot
hernodes
-B)Anodewi t
hthemostchildren
-C)Anodewi t
hatleastonechild
-D)Therootnode

*
*Answer
:A*
*

*
*47.Whatisthelev
elofanodeinatree?
**
-A)Thevalueofanode
-B)Thenumberofchil
drenanodehas
-C)Thedepthofanode
-D)Eachstepfr
om toptobot
tom i
nat r
ee

*
*Answer
:D*
*

*
*48.Whatistheheightofatree?
**
-A)Thevalueoftherootnode
-B)Thenumberofnodesi nthetree
-C)Thetotalnumberofedgesfrom ther
oott
oal
eafnode
-D)Thedepthofthetree

*
*Answer
:C*
*

*
*49.Whatisthedepthofanodeinatr
ee?**
-A)Thenumberofedgesf r
om t
heroott
othenode
-B)Theheightofthet
ree
-C)Thel
ev eloft
henode
-D)Thevalueofthenode

*
*Answer
:A*
*

*
*50.Whatisasubt
reeinat r
ee?**
-A)Atreewi
thmanybr anches
-B)Eachchi
ldf
orminganewt r
ee
-C)Atreewi
thnochil
dren
-D)Atreewi
thonl
yonechi ld

*
*Answer
:B*
*

Graph
**
1.Whati
sagr
aphi
ndat
ast
ruct
ures?
**
a)Asequentialar
rangementofel ement
s
b)Ali
neardat ast
ructure
c)Anon-l
ineardatastructur
ewithnodesandedges
d)Afi
nit
esetofnodeswi thoutconnect
ions

*
*Answer
:**c)Anon-
li
neardat
ast
ruct
urewi
thnodesandedges

*
*2.Inagraph,whatar
ethenodescal
l
ed?
**
a)Verti
ces
b)Edges
c)Paths
d)Elements

*
*Answer
:**a)Ver
ti
ces

*
*3.Whichofthef
oll
owi
ngi
sal
i
neardat
ast
ruct
ure?
**
a)St
ack
b)Queue
c)Graph
d)Li
nkedList

*
*Answer
:**d)Li
nkedLi
st

*
*4.Inagraph,whatar
eor
der
edpai
rsofconnect
ionsbet
weennodescal
l
ed?
**
a)Elements
b)Verti
ces
c)Edges
d)Paths

*
*Answer
:**c)Edges

*
*5.Whatdoes"fi
nit
e"meaninthecont
extofgr
apht
heor
y?*
*
a)Asmallnumberofnodes
b)Anarbi
trar
ynumberofnodes
c)Alar
genumberofnodes
d)Acountabl
eandlimi
tednumberofnodes

*
*Answer
:**d)Acount
abl
eandl
i
mit
ednumberofnodes

*
*6.Whati sacommonr eal
-wor
ldexampl
eofagr
aph?
**
a)Alineardatast
ruct
ure
b)Adi ct
ionary
c)Facebookconnecti
ons
d)Alinkedlist

*
*Answer
:**c)Facebookconnect
ions

*
*7.Whatisthepurposeofrepr
esenti
ngagr
aphasapai
rofset
s(V,
E)?
**
a)Toconfuseprogrammers
b)Tomaket hegraphmorecompl ex
c)Toseparatev
erti
cesandedges
d)Tosimpli
fygraphrepr
esent
ati
on

*
*Answer
:**c)Tosepar
atev
ert
icesandedges

*
*8.Whatisthet
ermf
orasequenceofedgesbet
weent
wonodesi
nagr
aph?
**
a)Edgeset
b)Vert
expath
c)Connect
ionrout
e
d)Path

*
*Answer
:**d)Pat
h

*
*9.Whatt ypeofgraphhasedgeswi
thoutaspeci
fi
eddi
rect
ion?
**
a)Di
rectedGr aph
b)WeightedGr aph
c)Undir
ect edGraph
d)Multi
graph

*
*Answer
:**c)Undi
rect
edGr
aph

*
*10.Inaweightedgraph, whatdoesthewei
ghtofanedger
epr
esent
?**
a)Theedge'
scolor
b)Theedge'
sdirecti
on
c)Thecostt
ot r
aversetheedge
d)Thenumberofv ert
icesconnected

*
*Answer
:**c)Thecostt
otr
aver
set
heedge

*
*11.Howcanagr aphberepr
esent
edusi
ngat
wo-
dimensi
onal
arr
ay?
**
a)Asali
stofv er
ti
ces
b)Asali
stofedges
c)Asanadjacencymatr
ix
d)Asali
nkedlist

*
*Answer
:**c)Asanadj
acencymat
ri
x

*
*12.Whatoper ati
onaddsorr
emov
esanedgebet
weent
wov
ert
icesi
nagr
aph?
**
a)Add/Remov eVert
ex
b)Add/Remov eEdge
c)Breadt
h-Fir
stSearch
d)Depth-
FirstSearch

*
*Answer
:**b)Add/
Remov
eEdge

*
*13.Whi cht r
av ersalalgorit
hm i
nagr
aphpr
oceedshor
izont
all
y?*
*
a)Breadth-FirstSearch( BFS)
b)Depth-FirstSearch( DFS)
c)EdgeDi sjointSubgr aph
d)VertexLabel edGr aph

*
*Answer
:**a)Br
eadt
h-Fi
rstSear
ch(
BFS)

*
*14.Whatt ypeofgraphi
schar
act
eri
zedbyhav
ingmul
ti
pleedgesbet
weent
hesamepai
rof
v
er t
ices?**
a)DirectedGraph
b)Wei ghtedGraph
c)Mul ti
graph
d)Nul lGraph

*
*Answer
:**c)Mul
ti
graph

*
*15.Whatisagraphwi
thnoedgesconnect
ingi
tsv
ert
icescal
l
ed?
**
a)Mul
ti
graph
b)Complet
eGraph
c)Nul
lGraph
d)Si
mpleGraph

*
*Answer
:**c)Nul
lGr
aph

*
*16.Inacompl
etegr
aph,
whati
sthedegr
eeofeachv
ert
ex?
**
a)0
b)1
c)n-
1
d)n

*
*Answer
:**c)n-
1

*
*17.Whati sadi r
ect
edgr
aphal
soknownas?
**
a)Si
mpl eGraph
b)Multi
graph
c)Di
graph
d)RegularGraph

*
*Answer
:**c)Di
graph

*
*18.Whatdoesawei
ght
edgr
aphassoci
atewi
thi
tsedges?
**
a)Color
s
b)Dir
ecti
ons
c)Weights
d)Label
s

*
*Answer
:**c)Wei
ght
s

*
*19.Whatdoesabi partit
egr
aphconsi
stof
?**
a)Twoi
solatedverti
ces
b)Twodisj
ointvert
exsubsets
c)Twoadjacentvert
ices
d)Twocompl et
egraphs

*
*Answer
:**b)Twodi
sjoi
ntv
ert
exsubset
s

*
*20.Whati sagraphcal
l
edwheni
tcont
ainsnocy
cles?
**
a)Cycl
icGraph
b)ConnectedGraph
c)Di
rectedGraph
d)Acycl
icGraph

*
*Answer
:**d)Acy
cli
cGr
aph

*
*21.Whi chofthef ol
lowingisNOTanappl
i
cat
ionofgr
aphsi
ncomput
ersci
ence?
**
a)Designofelectri
calcir
cuits
b)Studyofmol ecularstr
uctures
c)DesignofhumanDNA
d)Creati
ngalistofdat a

*
*Answer
:**d)Cr
eat
ingal
i
stofdat
a

*
*22.Whati
sthet
ermf
oragr
aphwher
etheor
derofv
ert
expai
rschangest
hemeani
ngoft
he
gr
aph?
**
a)Si
mpl eGraph
b)Multi
graph
c)Di
graph
d)WeightedGraph

*
*Answer
:**c)Di
graph

*
*23.Whati
sasubgr aphingraphtheory?*
*
a)Agr
aphwithmul tipl
edisconnectedcomponents
b)Agr
aphwi t
hadi ffer
entnumberofv erti
cesthant
heor
igi
nal
c)Asmal
lergraphcont ai
nedwithinalargerone
d)Agr
aphwi t
hcy cles

*
*Answer
:**c)Asmal
l
ergr
aphcont
ainedwi
thi
nal
argerone

**24.Whatist hemaindif
fer
encebetweenavert
ex -
disj
ointsubgraphandanedge- disj
oint
subgraph?**
a)Vertex-
disjoi
ntsubgr
aphshavenocommonv ert
ices,whileedge-di
sjoi
ntsubgraphshav e
nocommonedges.
b)Vertex-
disjoi
ntsubgr
aphshavenocommonedges, whil
eedge-disj
ointsubgr
aphshav e
nocommonv erti
ces.
c)Vertex-
disjoi
ntsubgr
aphshavenoedges,whil
eedge- disj
ointsubgraphshavenov ert
ices.
d)Vertex-
disjoi
ntsubgr
aphsaresmall
ert
hanedge- disj
ointsubgraphs.

**Answer
:**a)Ver
tex-
disj
ointsubgr
aphshav
enocommonv
ert
ices,
whi
l
eedge-
disj
oint
subgr
aphshavenocommonedges.

*
*25.Whati
saconnectedgr
aph?**
a)Agr
aphwit
honlyonever
tex
b)Agr
aphwit
hnoedges
c)Agr
aphinwhi
chanytwov er
ti
cesar
econnect
edbyapat
h
d)Agr
aphwit
hcycles

*
*Answer
:**c)Agr
aphi
nwhi
chanyt
wov
ert
icesar
econnect
edbyapat
h

*
*26.Whatdoes"cy cl
ic"meanint
hecontextofagr
aph?
**
a)Havi
ngasingl
ev ertex
b)Havi
ngmulti
pleedgesbetweenver
ti
ces
c)Cont
aini
ngcyclesorloops
d)Bei
ngacompl etegraph

*
*Answer
:**c)Cont
aini
ngcy
clesorl
oops

*
*27.Whatdoesav er
tex-
label
edgr
aphhol
dini
tsv
ert
ices?
**
a)Di
recti
onsofedges
b)Weightvalues
c)Dataorlabels
d)Col
ors

*
*Answer
:**c)Dat
aorl
abel
s

*
*28.Whatdoest het er
m" DAG"st
andf
ori
ngr
apht
heor
y?*
*
a)Di
rectedAcycl
icGr aph
b)Doubl
yAt t
achedGr aph
c)Di
graphandGr aph
d)Di
rectedandGr aded
*
*Answer
:**a)Di
rect
edAcy
cli
cGr
aph

**29.Inwhichappli
cat i
onwouldagraphbeusedt
orepr
esentt
hemol
ecul
arst
ruct
ureofa
substance?**
a)Designofelect
ricalci
rcui
ts
b)StudyofhumanDNA
c)Designofnetwor kedcomputer
s
d)Chemistry

*
*Answer
:**d)Chemi
str
y

*
*30.Whati sthepr i
mar ypurposeofusinggraphsi
ncomput
ersci
enceappl
i
cat
ions?
**
a)Tomakepr ogr amsmor ecompl ex
b)Toconfusepr ogrammer s
c)Toi
mpr oveef fi
ciencyandsolveproblems
d)Tocreatevisualart

*
*Answer
:**c)Toi
mpr
oveef
fi
ciencyandsol
vepr
obl
ems

*
*31.Whatdoest heterm"DFS"st
andf
ori
ngr
apht
rav
ersal
?**
a)Di
rectedFastSearch
b)DepthFir
stSearch
c)Double-
EdgedSearch
d)Di
rectedFini
teSearch

*
*Answer
:**b)Dept
hFi
rstSear
ch

*
*32.Whatt ypeofgraphhasmul
ti
pleedgesbet
weenv
ert
icesbutnosel
f-
loops?
**
a)WeightedGraph
b)Nul
l Graph
c)Multi
graph
d)Bi
parti
teGraph

*
*Answer
:**c)Mul
ti
graph

*
*33.Whatistheorderofagr aph?**
a)Thenumberofedgesi nthegraph
b)Thenumberofverti
cesint hegraph
c)Thewei
ghtofthegr aph
d)Thenumberofcyclesinthegraph

*
*Answer
:**b)Thenumberofv
ert
icesi
nthegr
aph

*
*34.Whatisthesi
zeofagr aph?**
a)Thenumberofedgesinthegraph
b)Thenumberofvert
icesinthegraph
c)Thewei
ghtofthegraph
d)Thenumberofcycl
esint hegr
aph

*
*Answer
:**a)Thenumberofedgesi
nthegr
aph

*
*35.Inabipar
tit
egr aph,howarethev
ert
exsubset
sdi
vi
ded?
**
a)I
ntot
wonon- disjoi
ntsubsets
b)I
ntot
wodi sj
ointsubsets
c)I
ntot
woconnect edsubsets
d)I
ntot
wocompl etegraphs
*
*Answer
:**b)I
ntot
wodi
sjoi
ntsubset
s

*
*36.Whatisthepurposeofl abeli
ngedgesi
nagraph?
**
a)Toaddcolorstothegr aph
b)Tospeci
fyedgedi r
ections
c)Todenot
et r
aversalcostt hrought
heedges
d)Tomarkverti
cesasv isit
ed

*
*Answer
:**c)Todenot
etr
aver
sal
costt
hrought
heedges

*
*37.Whati
saregulargr
aph? *
*
a)Agr
aphwi
thaconsi stentcolorscheme
b)Agr
aphwit
hauni f
orm edgedi rect
ion
c)Agr
aphwhereeachv ertexhasthesamedegree
d)Agr
aphwit
haspeci fi
cv ert
exlabeli
ngscheme

*
*Answer
:**c)Agr
aphwher
eeachv
ert
exhast
hesamedegr
ee

*
*38.Whi cht r
av ersalalgorit
hm i
nagr
aphpr
oceedsv
ert
ical
l
y?*
*
a)Breadth-FirstSearch( BFS)
b)Depth-FirstSearch( DFS)
c)EdgeDi sjointSubgr aph
d)VertexLabel edGr aph

*
*Answer
:**b)Dept
h-Fi
rstSear
ch(
DFS)

*
*39.Whatoperati
onchecksi
fthereisanedgebet
weent
wonodesi
nagr
aph?
**
a)Add/RemoveVertex
b)Add/RemoveEdge
c)Checki
ngoperat
ion
d)Fi
ndingapathbetweent
wov ert
ices

*
*Answer
:**c)Checki
ngoper
ati
on

*
*40.Whatoperati
onisusedtof
indapathbet
weent
wov
ert
icesi
nagr
aph?
**
a)Add/RemoveVertex
b)Add/RemoveEdge
c)Checki
ngoperat
ion
d)Fi
ndingapathbetweent
wov er
ti
ces

*
*Answer
:**d)Fi
ndi
ngapat
hbet
weent
wov
ert
ices

*
*41.Whatdoesacompl etegraphguarant
eer
egar
dingt
hedegr
eeofeachv
ert
ex?
**
a)Eachver
texhasadi
f f
erentdegree.
b)Eachver
texhast
hesamedegr ee.
c)Ther
earenoedgesbet weenverti
ces.
d)Eachver
texhasadegreeof1.

*
*Answer
:**b)Eachv
ert
exhast
hesamedegr
ee.

*
*42.Whatdoesadi
rect
edgr
aphuset
orepr
esentt
hedi
rect
ionofedges?
**
a)Arr
ows
b)Label
s
c)Color
s
d)Numbers
*
*Answer
:**a)Ar
rows

*
*43.Inawei ghteddir
ect
edgraph,
whatdot
hewei
ght
sassoci
atedwi
thedgesr
epr
esent
?**
a)Edgecolors
b)Edgedirect
ions
c)Trav
ersalcostthr
ought
heedges
d)Vert
exlabels

*
*Answer
:**c)Tr
aver
sal
costt
hrought
heedges

*
*44.Whatdoesanullgr
aphr epresenti
ngr
apht
heor
y?*
*
a)Agr
aphwithonl
yonev ertex
b)Agr
aphwithnoedges
c)Agr
aphwithnovert
ices
d)Agr
aphwithmult
ipl
ecy cles

*
*Answer
:**b)

I
ttookmeal ongtimetocompilet
hismcqs
I
fyouf i
ndthi
spdf.Helpf
ulpl
easeconsi
dermaki
ngadonat
iont
o
Opay
7087370763
Balogunkhal
i
dopey emi
I
twi l
lmeanalott
ome.

Goodl
uckwi
thy
ourexams

You might also like