LOYOLA COLLEGE (AUTONOMOUS), CHENNAI – 600 034
B.Sc. DEGREE EXAMINATION – COMPUTER SCIENCE
THIRD SEMESTER – APRIL 2012
CS 3502 – OBJECT ORIENTED PROGRAMMING WITH C++
Date : 24-04-2012 Dept. No. Max. : 100 Marks
Time : 9:00 – 12:00
PART- A
Answer all the questions: (10×2=20 Marks)
- Define Friend function.
- List out the C++ tokens.
- What is a constructor?
- What is the use of Dynamic constructor?
- Differentiate overloading and overriding.
- Define pointers.
- What is a stream class?
- Give the use of input and output stream.
- Define class template.
- List out the Keyword used for handling exceptions.
PART-B
Answer all the questions: (5×8=40 marks)
- a) Benefits of object oriented programming.
(or)
- b) Explain pure virtual function with example.
- a) Write a C++ program to find the area of rectangle & square using constructor and
destructor.
(or)
- b) Write about Multiple constructors with an example.
- a) Explain about various types of inheritance with suitable example.
(or)
- b) Explain the use of ‘This’ pointer with an example.
- a) Explain about I/O stream classes in C++.
(or)
- b) Discuss about the various modes a file can be opened in C++.
- a) Explain about Function templates.
(or)
- b) Write a C++ program using function template to find the maximum among two number in
integer, float & double.
PART-C
Answer any TWO questions: (2×20=40 Marks)
- a) Explain the basic concepts of object oriented programming language in detail.
- b) Write a C++ program to calculate the Fibonacci series using class.
- a) Explain the types of constructor with an example.
- b) Write a C++ program to calculate the net pay using constructor & destructor.
- a) Explain in detail about exception handling with suitable example.
- b) Explain class templates with an example.
Latest Govt Job & Exam Updates: