object oriented programming with c++ jan 2014
TRANSCRIPT
![Page 1: Object Oriented Programming With C++ Jan 2014](https://reader031.vdocument.in/reader031/viewer/2022011722/577cce6b1a28ab9e788e07e7/html5/thumbnails/1.jpg)
06cs44USN
Time: 3 hrs.
a.
b.
c.
3a.
Fourth Semester B.E. Degree Examinationo Dec.2013 lJan.20l4Object Oriented Programming with G++
Note: Answer FIVEfull questions, selectingat least TWO questions from each part.
Max. Marks:100 ,
.r,":
.l
(04 Marks)C)(J
o!aE
()
(.)
3e
6e6boltroo.=N
hooY(]og:-o
o2
a:
oc)
50ico(B
.G
4oO!
tcorvo'j
6=
!o=E>'hb0 --go!o=gotr>o-
U<J c.i
()oz
I a,.
b.
PART _ AWith examples, compare between structures in C with classes in C++.Write a function using reference variable as arguments to swap the values of a pair ofintegers. (04 Marks)
What is function overloading? Explain the advantages of overloading a function? Write aprogram in C++ to overload the function mul(a, b) where a and.b are integers and floating
'' ,i (12 Marks)point numbers?
Explain the role ofprivate and public access specifiers in classes. Explain with an ffifri?,
Write a program which creates a class called employee which consist of name, age, salary as
datamembers and read_data( ) and put_data( ) as 4ember functions? Create a array ofobjects which stores l0 employee's data. (08 Marks)What is a friend function? Why it is necessary? Explain the characteristics of a friend
b. Write a program to crate an array dynamically where the array size is specified during
function......::
Explain the difference between ,,qtEticmanagement.
(07 Marks)
memory management and dynamic memory(05 Marks)
......:
(08 Marks)(06 Marks)(06 Marks)
c.
4a.b.
c.
runtime. r,, '., (08 Marks)What is a constructor? Exploin with an example, how to overload a constructor. (07 Marks)
What is inheritancef Expkin the different forms of inheritance supported by C++. (12 Marks)Explain how the ordet.of constructor are invoked in inheritance with an example. (04 Marks)What is a virtual base class? Explain with an example. (04 Marks)
5 a. What are virtual functions? Erplui, the rnechanism of virtuat funciion with an example.PART _ B
7 a. Explain with an example how the "new" and "delete" operator isb. Demonstrate the overloading of > operator in C++ program.
8 a. Explain the four new-style casts supported by C++.b. With an example, explain the try, throw and catch keywords
exception handling.
b.
c.What is a pure virtual function? Explain its necessity with an example.Explain the text versus binary files with an example.
6 a,. IiVhat is operator overloading? What are the operators that cannot be overloaded? What are
the rules for overloading operator? (06 Marks)b. Write a C++ program to create a class called STRING and implement the following
operations. Display the results after every operator by overloading <<.i) String S1 : "GOOD" ii) String 52: "LUCK" iii) String 53 : Sl
c. Describe the following manipulators:i) setw( ) ii)setiosflags( ) iii) setfill( ) iv) reset JWarks)
-r'tirgirr<syf g6'r.9,C/
)..o .)11/-,--(I 0 Ma rks)
uset\#j$';lementing(10 Marks)
For More Question Papers Visit - www.pediawikiblog.com
For More Question Papers Visit - www.pediawikiblog.com
www.pediawikiblog.com