Enrollment No. ...........
END TERM EXAMINATION
Third Semester (BCA) December 2024
Paper Code: BCA-205
Subject: Object-Oriented Programming with C++
Time: 3 Hours
Maximum Marks: 60
Instructions: Attempt five questions in all, including Q. No. 1 which is compulsory. Select one question from each unit.
Q.1 Write short notes on the following (Attempt any five):
- (a) C++ Stream classes 4
- (b) Explain inline function 4
- (c) What is virtual function? 4
- (d) Differentiate between Call by value and Call by reference. 4
- (e) Explain Aggregation. 4
- (f) What is Abstract Class? 4
- (g) Differentiate between early binding and late binding. 4
- (h) Give an example of Template function. 4
UNIT-I
Q.2- (a) Differentiate between Procedural programming and Object-oriented programming. 5
- (b) Explain the use of new and delete operators using an example. 5
OR
Q.3- (a) What are the features of Object-oriented Programming? 5
- (b) Differentiate between C and C++. 5
UNIT-II
Q.4- (a) What is the friend function? Write a C++ program to illustrate the use of the friend function. 5
- (b) What is a constructor? Explain various types of constructors. Write a C++ program to illustrate the use of the default constructor, parameterized constructor, and copy constructor. 5
OR
Q.5- (a) Define operator overloading. Write a C++ program to overload '+' operators to concatenate two strings and two complex numbers. 5
- (b) Explain the Access Specifiers in C++ and also give a suitable example. 5
UNIT-III
Q.6- (a) What are the different forms of inheritance supported by C++? Explain with examples. 5
- (b) Explain the different forms of polymorphism in C++ with the help of an example. 5
OR
Q.7- (a) What is Unary Operator Overloading? Write a C++ program to implement it. 6.5
- (b) What is a Pure Virtual function? Explain with a suitable example. 6
UNIT-IV
Q.8- (a) Explain the difference between exception and error. Write a program containing a possible exception. Use a try block to throw it and a catch block to handle it properly. 5
- (b) What are command line arguments in a file? Write a program to explain how to read text and to display its contents on the screen. 5
OR
Q.9- (a) What is a template? Write a template for adding two numbers of different data types. 5
- (b) What is generic programming? How is it implemented in C++? 5