END TERM EXAMINATION | |
Third Semester[BCA] | December 2024 |
Paper Code: BCA-205 | Subject : Object Oriented Programming with C++ |
Time:3 Hours | Maximum Marks:60 |
Note: Attempt 5 questions in all including Q.No.1 which is compulsory. Select one question from each unit. | |
Q1 Write short note on the following (any five) : (5*4=20) | |
(a) C++ Stream Classes | |
(b) Explain inline functions. | |
(c) What is a virtual function? | |
(d) Differentiate between Call by Value and Call by Reference. | |
(e) Explain Aggregation. | |
(f) What is an Abstract Class? | |
(g) Differentiate between early binding and late binding. | |
(h) Give an example of a Template function. | |
UNIT I | |
Q2. (a) Differentiate between Procedural Programming and Object-Oriented Programming. (5) | |
(b) Explain new and delete operators using an example. (5) | |
or | |
Q3. (a) What are the features of Object-Oriented Programming? (5) | |
(b) Differentiate between C and C++. (5) |
|
UNIT II | |
Q4. a) What is the friend function? Write a C++ program to demonstrate its use. (5) | |
b) What is a constructor? Explain various types of constructors. Write a C++ program to illustrate the use default constructor, parameterized constructor and copy constructor. (5) | |
or | |
Q5. a) Define operators overloading. Write a C++ Program to overload ‘+’ operators to concatenates two string and two complex numbers. (5) | |
b) Explain the Access specifiers in C++ and also give suitable examples. (5) | |
UNIT III | |
Q6. 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 example. (5) | |
or | |
Q7.a) What is Unary Operator overloading? Write a C++ program to implement it. (5) | |
b) What is Pure Virtual Function? Explain with a suitable example. (5) | |
UNIT-IV | |
Q8. 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 the text and to display its contents on the screen. (5) | |
or | |
Q9.a) What is a template? Write a template for adding two numbers of different data types. (5) | |
b) What is generic programming? How it is implemented in C++? (5) |