Assessment No ______________ 8atch Code __________________
Name ______________________ Assoc|ate ID _________________
Max Marks 100 Marks Cbtd _________________
1|me 02 nr 1Sm|n
Genera| Instruct|ons
O A|| uest|ons are Compu|sory O 1h|s quest|on paper |s d|v|ded |nto 02 parts 4 ect|on A conta|ns 90 uest|on carry 01 mark each 4 ect|on 8 conta|ns 02 uest|on carry 0S mark each O Ca|cu|ators are not a||owed O 9|ease ensure the sequence of quest|ons |s to be correct
ect|on A
1 What w||| be the output |f you w||| execute fo||ow|ng C code?
vold maln()
prlnLf(d""abcde"abcde")
a 0 b 1 c 1 d Carbage e CompllaLlon Lrror
2 What w||| be the output |f you w||| execute fo||ow|ng C code?
vold maln()
prlnLf(c"*"abcde")
a acbcd
b e c a d null e CompllaLlon Lrror
What w||| be the output |f you w||| execute fo||ow|ng C code?
#lncludesLdloh #lncludeconloh vold maln()
lnL a1x xsq(++a)+sq(a++)+sq(a++) prlnLf(d"x)
lnL sq(lnL num)
8eLurn num*num
a 13 b 16 c 17 d 18 e CompllaLlon Lrror
C++ was or|g|na||y deve|oped by
a nlcolas WlrLh b uonald knuLh c 8[arne SLrousLrop d ken 1hompson
S When a |anguage has capab|||ty to produce a new data type |t |s ca||ed
a LxLenslble b Cverloaded c LncapsulaLed d 8eprehenslble
What |s the t|me to requ|re to |nsert an e|ement |n a stack w|th ||nked |mp|ementat|on
a C(n) b C(1) c C(logn) d C(log)
1|me taken for add|t|on of e|ement |n queue |s
a C(1) b C(n) c C(log n) d none of Lhese
1o de|ete a dynam|ca||y a||ocated array named 'a' the correct statement |s
a deleLe a b deleLe a0 c deleLe a d deleLe 0a
9 What w||| be the va|ue of 'a' after the fo||ow|ng code |s executed
# def|ne square (x) x*x asquare(2+)
a 3 b 1 c 11 d 10
101he f|ve |tems A 8 C D and L are pushed |n a stack one after the other start|ng from A 1he stack |s popped four t|mes and each e|ement |s |nserted |n a queue 1hen two e|ements are de|eted from the queue and pushed back on the stack Now one |tem |s popped from the stack 1he popped Item |s
a A b 8 c C d u
11Cb[ect Cr|ented 1echno|ogy`s use of _________ fac|||tates the reuse of the code and arch|tecture and |ts __________ feature prov|des systems w|th stab|||ty as a sma|| change |n requ|rements does not requ|re mass|ve changes |n the system
a LncapsulaLlon lnherlLance b lnherlLance olymorphlsm c lnherlLance LncapsulaLlon d olymorphlsm AbsLracLlon
12UML tands for
a unlque Modelllng Language b unlfled Modelllng Language c unlfled Modern Language
d unlfled MasLer Language
1Wh|ch of the fo||ow|ng programm|ng techn|que focuses on a|gor|thm
a rocedural Language b Cb[ecL orlenLed Language c Cb[ecL based Language d SLrucLural Language
1___________ prov|de usefu| conceptua| framework
a lnherlLance b olymorphlsm c LncapsulaLlon d none of 1hese
1SWh|ch of the fo||ow|ng |s true
a Class ls an ob[ecL of ob[ecL b Class ls a meLa class c Class cannoL have zero lnsLances d none of Lhese
1Wh|ch of the fo||ow|ng |s the correct way to dec|are a f|oat po|nter
a floaL pLr b floaL *pLr c *floaL pLr d none of Lhe above
1What |s the va|ue of "z" |n the be|ow code
|nt z x S y 10 a b 2 z x++ y * b ] a
a 3 b 6 c 10 d 11 e 1
1W|th every use of memory a||ocat|on funct|on what funct|on shou|d be used to re|ease a||ocated memory wh|ch |s no |onger needed?
a unalloc() b dropmem() c dealloc() d release() 3
e free()
19Wh|ch one of the fo||ow|ng |s the correct cho|ce for mov|ng b|ocks of b|nary data that are of arb|trary s|ze and pos|t|on |n memory?
a memcpy() b memseL() c sLrncpy() d sLrcpy() e memmove()
20What |s the va|ue of x |n th|s code
|nt x 2 * + * S
a b 6 c 6 d 30 e 70
21|nt var1 If var|ab|e has been dec|ared w|th f||e scope as above can |t safe|y be accessed g|oba||y from another f||e
a ?es lL can be referenced Lhrough Lhe reglsLer speclfler b no lL would have Lo been lnlLlally declared as a sLaLlc varlable c ?es lL can be referenced Lhrough Lhe exLern speclfler d ?es lL can be referenced Lhrough Lhe publlsh speclfler e no lL would need Lo have been lnlLlally declared uslng Lhe global keyword
22t|me_t t Wh|ch one of the fo||ow|ng statements w||| proper|y |n|t|a||ze the var|ab|e t w|th the current t|me from the samp|e above?
a L clock() b Llme(L) c L cLlme() d L localLlme() e none of Lhe above
2Wh|ch one of the fo||ow|ng w||| dec|are a po|nter to an |nteger at address 0 k 200 |n memory?
a lnL *x *x 0 x 00 b lnL *x 0 x 00 c lnL *x *0 x 00 d lnL *x 0 x 00 e lnL *x (0 x00) 6
2In a C express|on how |s a |og|ca||y AND represented?
a [[ b | | c Anu d e Anu
2SWh|ch one of the fo||ow|ng w||| read a character from keyboard and stored |n a var|ab|e c?
a c geLc() b geLc( c) c c geLchar(sLdln) d geLchar( c) e c geLchar()
2Wh|ch one of the fo||ow|ng C operators |s r|ght Assoc|at|ve?
a b c d e
2Wh|ch of the fo||ow|ng pr|ntf() format spec|f|ers |nd|cates to pr|nt a doub|e va|ue |n dec|ma| notat|on |eft a||gned |n a 0character f|e|d to four () d|g|ts of prec|s|on?
a 0e b 0e c 0f d 0f e #0f
2char txt20 "ne||o Wor|d0" now many bytes are a||ocated for def|n|t|on above?
a 11 b 1 c 1 d 0 e 1
29Wh|ch one of the fo||ow|ng var|ab|e names |s not va||d?
a go_carL b golL c season 7
d run e _whaL
0Wh|ch one of the fo||ow|ng statements a||ocates enough space to ho|d an array of 10 |ntegers that are |n|t|a||zed to 0?
a lnL *pLr (lnL *) malloc (10 slzeof(lnL)) b lnL *pLr (lnL *) calloc (10 slzeof(lnL)) c lnL *pLr (lnL *) alloc (10 slzeof(lnL)) d lnL *pLr (lnL *) calloc (10* slzeof(lnL)) e lnL *pLr (lnL *) malloc(10*slzeof(lnL))
1When app||ed to a var|ab|e what does the unary "" operator y|e|d?
a varlable value b varlable 8lnary form c varlable Address d varlable formaL e varlable 8lfhL value
2Wh|ch one of the fo||ow|ng |s not a va||d |dent|f|er?
a _ldenL b auLo c blgnumber d g77 e peace_ful_ln_space
W|ch one of the fo||ow|ng |s not a va||d Ident|f|er?
a __S b 1__ c __1 d __ e S__
Wh|ch one the fo||ow|ng |s the r|ght method for open|ng a read on|y ACII f||e?
a flleCpen(fllenm"r") b flleCpen(fllenm"ra") c flleCpen(fllenm"read") d fCpen(fllenm"read") e fCpen(fllenm"r")
SWhat number |s equ|va|ent to e?
a 000 b 00 8
c 0 d 000 e 000
What w||| be the va|ue of x?
|nt x 011 | | 0 k 10
a b 1 c 19 d 3 e 7
A constructor |s ca||ed whenever
a A ob[ecL ls declared b An ob[ecL ls used c A class ls declared d A class ls used
8y defau|t member of a C++ c|ass are
a rlvaLe b ubllc c roLecLed d none of Lhe above
91he f|rst step |n the systems deve|opment ||fe cyc|e (DLC)
a Analysls b ueslgn c roblem / CpporLunlLy ldenLlflcaLlon d uevelopmenL and uocumenLaLlon
0now many steps are |n the program deve|opment ||fe cyc|e (DLC)
a b 3 c 6 d 10
1now many steps are |n the program deve|opment ||fe cyc|e (9DLC)
a b 3 c 6 d 10 9
2_________ des|gn and |mp|ement database structures
a rogrammers b ro[ecL managers c 1echnlcal WrlLers d uaLabase AdmlnlsLraLors
1echn|ca| Wr|ters genera||y prov|de the ________ for the new system
a rograms b neLworks c Analysls d uocumenLaLlon
Debugg|ng |s
a CreaLlng program code b llndlng and correcLlng errors ln Lhe program code c ldenLlfylng Lhe Lask Lo be compuLerlzed d CreaLlng Lhe algorlLhm
S1he prob|em statement shou|d |nc|ude a|| of the fo||ow|ng LkCL91
a lnpuL b ouLpuL c processlng d sLorage
1he _________ determ|nes whether the pro[ect shou|d go forward
a leaslblllLy assessmenL b CpporLunlLy ldenLlflcaLlon c SysLem evaluaLlon d rogram speclflcaLlon
What does the abbrev|at|on D8M stands for
a uaLabase manlpulaLlon sofLware b uaLa borrowlng and movemenL sofLware c uaLabase managemenL sysLems d ulglLal base mapplng sysLem
A row |n database |s ca||ed
a uomaln b 1uple c uegree 10
d none of Lhe above
9tack |s based on _____ techn|que
a lllC b LllC c LlLC d none of Lhese
S0ueue |s based on ______ techn|que
a lllC b LllC c llLC d none of Lhese
S1Does the data type of a|| |tem |n UNICN |s same
a 1rue b lalse
S2We can mod|fy the po|nters "source"as we|| as "target"
a 1rue b lalse S1he ACII code of '0' (zero) |s
a 8u b c d 0011 1000
SNumbers are stored and transm|tted |ns|de a computer |n
a 8lnary form b ASCll Code form c ueclmal form d Alphanumerlc form
SSWh|ch of the fo||ow|ng |s a group of one or more attr|butes that un|que|y |dent|f|es a row?
a key b ueLermlnanL c 1uple d 8elaLlon
SA re|at|on |s cons|dered as
11
a Column b 1 u 1able c u 1able d u 1able
SA funct|on dependency |s a re|at|onsh|p between or among
a Lables b rows c relaLlons d aLLrlbuLes
SIf attr|bute A and 8 determ|ne attr|bute C then |t |s a|so true that
a A C b 8 C c ( A 8 ) ls a composlLe deLermlnanL d C ls s deLermlnanL
S9A re|at|on |n th|s form |s free of a|| mod|f|cat|ons anoma||es
a llrsL normal lorm b Second normal lorm c 1hlrd normal lorm d uomaln /key normal lorm 0Lvery t|me attr|bute A appears |t |s matched w|th the same va|ue of attr|bute 8 but not the same va|ue of attr|bute C 1herefore It |s true that
a A 8 b A C c A (8 C) d (8 C) A
1kow |s synonymous w|th the term
a 8ecord b 8elaLlon c Column d lleld
2A re|at|on |s |n SNI when mu|t|va|ued dependenc|es are |so|ated |n the|r own re|at|on
a 1rue b lalse
1he on|y reason for ex|stence of re|at|ons |s to store |nstances of funct|ona| dependenc|es
a 1rue 1
b lalse
G|ven the funct|ona| dependency k k |s ca||ed the determ|nant
a 1rue b lalse
SA re|at|on |n 8oyceCodd Norma| Iorm (8CNI) |f every determ|nant |s a compos|te key
a 1rue b lalse
A funct|ona| dependency |s a|ways an equat|on
a 1rue b lalse
8y Defau|t members of C ] C++ are
a publlc b prlvaLe c lnLernal d proLecLed e none of Lhe Above
A re|at|onsh|p between the |nstances of s|ng|e ent|ty type |s ca||ed ____________ re|at|onsh|p
a 8lnary b 1ernary c rlmary d unary e 1erLlary
9tor|ng a separate copy of database at mu|t|p|e |ocat|ons |s
a uaLa 8epllcaLlon b orlzonLal arLlLlonlng c verLlcal arLlLlonlng d orlzonLal and verLlcal arLlLlonlng
0A d|str|buted database has wh|ch of the fo||ow|ng advantages over a centra||zed database
a SofLware CosL b SofLware ComplexlLy c Slow 8esponse d Modular CrowLh
1Wh|ch of the fo||ow|ng |s not one of the stages |n the evo|ut|on of d|str|buted D8M? 1
a unlL of Work b 8emoLe unlL of Work c ulsLrlbuLed unlL of Work d ulsLrlbuLed 8equesL
2kedundancy |s m|n|m|zed w|th a computer based database approach
In the software test|ng process when |s va||dat|on test|ng performed
a AfLer Codlng b AfLer unlL 1esLlng c AfLer Module 1esLlng d AfLer lnLegraLlon 1esLlng
S1he ma|n goa| ua||ty Assurance |s
a SeL Codlng SLandards b lmprove SofLware pro[ecL ManagemenL c 8educe Lhe Lechnlcal and programmaLlc rlsks ln developlng Lhe sofLware d Speclfy correcLlve acLlons
Wh|ch funct|on |s used to re|ease the a||ocated memory space?
a deallocaLe() b release() c free() d drop() e empLy()
What |s the ACII va|ue of "Lnter" key
a 11 b 1 c 1 d 1 e 13
9roduct ua||ty |s def|ned as
1
a uellverlng a producL wlLh correcL requlremenLs b uellverlng a producL uslng correcL developmenL procedures c uellverlng a producL whlch ls developed lLeraLlvely d uellverlng a producL uslng hlgh quallLy procedures
9Wh|ch of the fo||ow|ng |s not a part of oftware ua||ty Assurance 9|an
a 8eference uocumenLs b ConflguraLlon AcLlon c Suppller ConLrol d CusLomer ConLrol
0Wh|ch of the fo||ow|ng |s not usua||y present |n a techn|ca| rev|ew
a user b CuallLy Lnglneer c 1he programmlng Lools suppller d SpeclallsL wlLh knowledge of appllcaLlon
11he or|g|na| ACII codes
a Were 7 blLs b 8 blLs c 8epresenLed 36 characLers d 8epresenLed 17 characLers
21he b|t b|nary number "0111" represents
a 13 b 7 c 7 d 1
1he dec|ma| number 12 may be represented by
a 1111 11118 b 1000 00008 c LL d 0111 1111
9o|nt out error |n the fo||ow|ng code
typedef struct
|nt data NCDL91k ||nk *NCDL91k
13
a Lrror ln *nCuL18 b Lrror Lypedef cannoL be used unLll lL ls deflned c no Lrror d none of Lhe Above
SWhat w||| be the output of the fo||ow|ng program
#|nc|ude std|oh |nt ma|n()
typedef |nt LCNG LCNG a LCNG b f|oat c 0 c b b + a pr|ntf("d"b) pr|ntf("fn"c) return 0
a 7 68000000 b 7000000 68 c 68000000 7000000 d 68 7000000