BCA-Bachelor of Computer Application 2nd Semester
Object-Oriented Programming Using C++
Paper-BCA-16-204
Time Allowed: Three Hours] [Maximum Marks: 65
Note: Attempt one question from each Section and the entire compulsory question. All questions carry equal marks.
SECTION-A
1. Differentiate between encapsulation and abstraction. Which access specifier can help to achieve data hiding in Ch? Demonstrate with an example program.
2. Discuss the following:
(a) Manipulators
(b) Type casting
SECTION-B
3. (a) What is the need of a friend function in a C++ program? What are the rules of implementing it ? (b) How are static members accessed in C++?
4. (a) Write a program to add two matrices using operator overloading.
(b) How is a constructor different from an ordinary function? Discuss copy constructor.
SECTION-C
5. When should inheritance be used in an object-oriented program? Describe multilevel inheritance and hybrid inheritance with practical examples.
6. Why is late binding important in OOPS? What is the role of virtual functions here? Demonstrate the implementation.
SECTION-D
7. What should be placed inside a try block? When do we use multiple catch handlers? What are the benefits achieved?
8. Describe the various classes available for file operations. What are the different ways of opening a file and which one is used when?
SECTION-E
(Compulsory Question)
9. (a) Function overloading
(b) Operators that cannot use friend functions
(c) Making a protected member inheritable
(d) File modes
(e) Conversion from one class to another class type.
0 comments:
Post a Comment
North India Campus