CS201 Solved Final Term Papers

Embed Size (px)

Citation preview

  • 7/24/2019 CS201 Solved Final Term Papers

    1/6

    http://vustudents.ning.com/

    MCQS SOLVED BY:_ALIMS_

    Question: 1

    New operator is used to allocate memory from the free store during ______________

    Compile Timeun Time

    Lin! Time

    "one o# $%ove

    Question: 2

    o get the memory address of a !aria"le we use _____

    &

    &&'

    (

    Question: #

    If we ha!e a program that writes the output data $num"ers% to the disc& and if we collect the

    output 'ata and write it on the disc in one write operation instead of writing the num"ers one

    "y one( In the a"o!e situation the area where we will gather the num"er is called

    Bu##e)St)e$m

    Memo)*"one o# these

    Question: )

    *hat functionality the following program is performing+

    +include ,iost)e$m.h-

    int m$in

    0const int S12E 3 456

    ch$) %u##e)7S12E86

    cout ,,9 Ente) $ sentence : 96

    cin.getline%u##e) S12E6cout,,%u##e) ,,endl6

    http://vustudents.ning.com/

    http://vustudents.ning.com/http://vustudents.ning.com/http://vustudents.ning.com/http://vustudents.ning.com/
  • 7/24/2019 CS201 Solved Final Term Papers

    2/6

    http://vustudents.ning.com/

    s*stem9p$use96

    ;

    o%

  • 7/24/2019 CS201 Solved Final Term Papers

    3/6

    http://vustudents.ning.com/

    *hich of the following is a destination of cout stream+

    Monito) /sc)eene*%o$)d

    Memo)*

    "one o# these

    Question: 1

    *hich of the following is the correct definition of streams +

    st)e$ms $)e memo)* loc$tionsseuence o# %*tes $)e c$lled st)e$ms

    seuence o# v$)i$%les $)e c$lled st)e$ms

    seuence does not h$ve $n* de#inition

    Question: 11Stream operators are hea!ily o!erloaded means & they allow to handle int and character data

    type only(

    t)ue

    #$lse

    Question: 12

    *hat functionality the following program is performing+

    int m$in0

    const int S12E 3 456ch$) %u##e)7S12E86

    cout ,,9 Ente) $ sentence : 96

    cin.getline%u##e) S12E6cout,,%u##e) ,,endl6

    s*stem9p$use96

    ;

    )e$d $nd )ite mem%e) #unctions o# cin $nd cout o%

  • 7/24/2019 CS201 Solved Final Term Papers

    4/6

    http://vustudents.ning.com/

    get $nd )ite mem%e) #unctions o# cout $nd cin o%unctions

    Ope)$to)s

    M$nipul$to)sO%

  • 7/24/2019 CS201 Solved Final Term Papers

    5/6

    http://vustudents.ning.com/

    Mem%e) #unction o# cl$ss

    "onHmem%e) #unction o# cl$ssBoth mem%e) $nd nonHmem%e) #unction

    "one o# the given options

    e#e)ence: Thesecin

    andcout

    objects will remain intact for our overloadedinsertion and extraction operators. Therefore, the overloaded operators cannot

    be member operators.)

    Note: I took this reference

    he pointer returned "y the new operator points to 888888888888888 of memory chun4s allocated

    "y the new operator

    >i)st memo)* $dd)ess

    Second memo)* $dd)ess

    L$st memo)* $dd)ess"one o# the $%ove

    *hen we used eof $end of file% with the file reading than which of the following is a true

    statement+

    This is $* to chec! sou)ce o# the st)e$m

    This is $* to chec! destin$tion o# the st)e$m

    This is $* to chec! st$te o# the st)e$m

    This is $* to chec! t*pe o# the st)e$m

    he stream insertion and e7traction operators are not already o!erloaded for ____

    BuiltHin d$t$ t*pes

    =se)Hde#ined d$t$ t*pes

    Both %uiltHin $nd use)Hde#ined t*pes

    "one o# the given options

    *hen a !aria"le is defined as static in a class then ___________

    Sep$)$te cop* o# this v$)i$%le is c)e$ted #o) e$ch o%

  • 7/24/2019 CS201 Solved Final Term Papers

    6/6

    http://vustudents.ning.com/

    Static !aria"le which is defined in a function is initiali9ed ________(

    Onl* once du)ing its li#e time

    Eve)* time the #unction c$ll

    Compile time o# the p)og)$m

    "one o# the $%ove

    *hich of the following concept is N associated with stream+

    "=LL

    http://vustudents.ning.com/

    http://vustudents.ning.com/http://vustudents.ning.com/http://vustudents.ning.com/http://vustudents.ning.com/