Sei sulla pagina 1di 2

Reg.No. Reg.No.

J.J.COLLEGE OF ENGINEERING AND TECHNOLOGY


TIRUCHIRAPPALLI – 620 009
DEPARTMENT OF COMPUTER SCIENCE & ENGG.
J.J.COLLEGE OF ENGINEERING AND TECHNOLOGY MODEL EXAM – Set 2
TIRUCHIRAPPALLI – 620 009 Sub Sub
DEPARTMENT OF COMPUTER SCIENCE & ENGG. CS2203 OBJECT ORIENTED PROGRAMMING
Code Name:
MODEL EXAM – Set 1 Time
Date of Max
Sub Sub 22.10.2013 100 Semester III 09:30 AM to
CS2203 OBJECT ORIENTED PROGRAMMING Exam Marks
Code Name: 12:30 AM
Time
Date of Max
22.10.2013 100 Semester III 09:30 AM to
Exam Marks PART – A (10 x 2 = 20)
12:30 AM
PART – A (10 x 2 = 20) (Answer ALL the Questions)
(Answer ALL the Questions) 1. List any four object oriented programming concepts.
1. What is the difference between the class and structure? 2. What is a copy constructor?
2. State the advantage of new and delete over malloc() and free functions. 3. What are the operators that cannot be overloaded?
3. What is the need for initialization of objects using constructors? 4. What happens when a raised exception is not caught by catch block?
4. What is destructor? 5. Illustrate the exception handling mechanism.
5. What is a template? What are their advantages? 6. What are the visibility modes in inheritance?
6. What is ‘throw()’? What is its use? 7. What are the file stream classes used for creating input and output files?
7. What is inheritance? What are the types of inheritance? 8. List any four containers supported by Standard Template Library.
8. What is meant by abstract class?
9. Write any 5 format flags and give its description.
9. What are streams? Why they are useful?
10. What is a namespace? 10. What are the steps involved in substring operations?
PART – B ( 5 x 16 = 80) PART – B ( 5 x 16 = 80)
(Answer ALL the Questions) (Answer ALL the Questions)
11. a) Explain the principles of object oriented programming with illustrative examples. 11 (a) (i) Explain the idea of Classes, Data abstraction and encapsulation. (8)
(16) (ii) Write a C++ program that inputs two numbers and outputs the largest number
Or using class.. (8)
b) (i) What is a function overloading? Explain with an example program. (8) Or
b) (i) What is a function overloading? Explain with an example program. (8)
(ii) What is friend function? Explain with an example. (8)
12. a) What are the various types of constructors? Illustrate with example programs (ii) What is friend function? Explain with an example. (8)
Or (16) 12. a) What are the various types of constructors? Illustrate with example programs
b) Define a class called complex. Include functions for reading and displaying Or (16)
complex objects. Write a function to overload + operator to add two complex objects. b) Define a class called complex. Include functions for reading and displaying
(16) complex objects. Write a function to overload + operator to add two complex objects.
13. a) (i) Write the syntax for member function template. (4) (16)
(ii) Write a C++ program using template for Quick sort. (12) 13. a) (i) Write the syntax for Class and function template. (4)
(ii) Write a C++ program using template for Merge sort. (12)
Or Or
b) Discuss in detail exception handling constructs in C++. Write a program to b) Discuss in detail exception handling constructs in C++. Write a program to
illustrate divide by zero exception handling. (16) illustrate divide by zero exception handling. (16)
14. a) (i) What is polymorphism? What is the difference between compile time and 14. a) (i) Explain the different forms of inheritance. (4)
runtime polymorphism? Explain. (8) (ii) Write a C++ program handling the following details for students
(ii) Consider base class Base and derived class Derived. Assume bptr is a pointer and staff using inheritance.
to base class and dptr is a pointer to derived class. Differentiate between these two Student details : name, address, percentage marks.
pointers in terms of accessing the derived class object. (8)
Staff details : name, address, salary.
Or
b) Explain the various runtime casting in detail. (16)
Create appropriate base and derived classes. Input the details and
output them. (12)
15. a) What are manipulators? Explain in detail various manipulators used for I/O
Or
operations with example. (16)
b) Explain the various runtime casting in detail. (16)
Or
15. a) What are manipulators? Explain in detail various manipulators used for I/O
b) (i) Write a program to read and count the characters in a string. (8)
operations with example. (16)
(ii) Explain Random Access in file handling with example. (8)
Or
b) (i)What are ios functions. Write the difference between ios functions and
manipulators (6)
(ii) Explain Random Access in file handling with example. (10)

FACULTY NAME : Ms.D.Kiruthiga & Ms.R.Vanathi Priyadharshini


FACULTY NAME : Ms.D.Kiruthiga & Ms.R.Vanathi Priyadharshini

Potrebbero piacerti anche