Object Oriented Programming With C Dec 2010
Object Oriented Programming With C Dec 2010
com
USN Fourth Semester B.E. Degree Examination, December 2010 Object Oriented Programming with C++
Time: 3 hrs.
06CS44
Max. Marks:lOO
Note: Answer any FIVE full questions, selecting at least TWO questions from each part.
PART-A
a. b. c.
State the important features of object oriented programming. Compare the object oriented system, with procedure oriented system. (08 Marks) What is function overloading? Illustrate function overloading through add function which adds two integers, two float numbers. (06 Marks) Explain the working of inline functions, with an example. (06 Marks) What is a friend class? Illustrate friends as bridges. Explain: i) this operator ii) arrow operator. What are nested classes? What is a constructor? Explain different types of constructors. Explain new 1d delete operators used in dynamic memory allocation. What is a destructor?
(10 Marks) (05 Marks) (05 Marks) (08 Marks) (10 Marks) (02 Marks)
a. b. c. a. b. c. a. b.
What is inheritance? Explain the different types of inheritance possible in C++. (10 Marks) Write a C I I program to create a class STUDENT with data members USN, name and age.Using inheritance, create class UGSTUDENT having fields semester, fees and stipend. Enter data for at least 5 students and compute the semesterwise average age for UG students.
(10 Marks)
PART-B
a. b. c.
What is a virtual function? Explain with a suitable example. (10 Marks) Write a short note on 1 /0 stream classes, with hierarchy for C++ stream handling. (05 Marks) What is a pure vil1ual function? Explain with an example. (05 Marks)
(05 Marks) (05 Marks) (10 Marks)
a. b.
Write a program to add two complex numbers by overloading the + operator. Display the complex numbers by overloading<< operator. (10 Marks) Illustrate the overloading of new and delete operators. (10 Marks) What is exception handling? How are exceptions handled in C++? Write short notes on : i) RTTI ii) Templates
(10 Marks)
a. b.
(10 Marks)
****