Sie sind auf Seite 1von 2

USN

B.E. Deg ree Examination, July/Aug us t 2005


Comp uter Scien ce/Jnfur ma lio n Sci ence and En g ineeri ng
OPP with C++
CS36
Tint<: hrs I )Max. :\larks I 00
"'ote: Answer uny riVL ftlll question:;.
1. ,, Bnngout the liilllt>nl Ct-.11ures of structural progr.1mnung and objt>ct oriented
program IS MrtcJ
(b) f,plain volatile ,md <"OilSI ()ll,1laflers.
l) How are strings h.mdltd in C++? Discuss wiiJ1 appropri:tle t>x<lmpJes.
2. ''! \<\'hat d)ma mic memory m<lnilgement?
examples.
How is it handled in C++? Give
13
1h) \\'hilt are 'inline fumtions'? Expl<1in brieny.
() \VIu l ME' the il<h antilRt'<; of uSU1" fwlCtion.s? c>.pf.1 in function prototyping and
dt>limtion with e"ample 18 J.brlcsl
3. (.) WIMI IS hmction O\ Discuss Uu-t>e steps of overload with
x,unples. t& Mrt..<l
(h) \Vhat are fun<.:lion templ,1tcs and function instant.k1tton? ,,.1.1in.
(<") \\'rite a C++ progr.11n to demonstrate funcuon templ<lt<'S L 1.'1 'mmimum ( )'be
tuncuon ll1e progr.1m finus m.inimum of given two numl>t.rs with different dat..l
t\ pe..; sud\ as mteg<'r, Oo.1 ling point and double tS r.t.ri<l
4. 1.11 Dl'fme 'class' ,\nd 'oi>Jl'<"t' With iln example, l.'xplain the concept of data encap-
<.ul.thun and arcessing of m..:ml)('r elements.
18 Mrksl
, hl W rile .1 note on p .. ranwtl.'ri"t'd constructor and construcl<>r w11J1 default arguments.
14 ltt.rksl
CrealP a class d.1 te whkh has dd, nun .u1d )'}". inl!.'gt>r member \'anables. A
constructor "i!Jl three to initialize it. Member functions
1) to display dille in dd mm vy format
1i1 to fmd d.iCCerenn llE'tween two dates and di spl.lY tlx. total number of days
Also ,, n"lilin ( ) to inJbali7E' two objects to two d1fferenl diltes .u1d display IJ1e
number of days llE'tween tS Morbi
5. t.l) Wnte a C++ progr.1m to perfor m ariUunetic operations like add and subtract two
complex n wnbers. Ov<rload tJ1e operators - and -. t8 Mrksl
(I>J f'xpl,lt.Jl space SdVill);
(,1 Explain d.ifferent par,uncter passing methods used m C++. IS Mri<l
For More Question Papers Visit - http://pediawikiblog.blogspot.com
For More Question Papers Visit - http://pediawikiblog.blogspot.com


For More Question Papers Visit - http://pediawikiblog.blogspot.com
For More Question Papers Visit - http://pediawikiblog.blogspot.com

Das könnte Ihnen auch gefallen