0% found this document useful (0 votes)
39 views

BCA - 2nd Sem - June 2022

Question paper

Uploaded by

Arryaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
39 views

BCA - 2nd Sem - June 2022

Question paper

Uploaded by

Arryaa
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 3
@ Gi) Printed Pages : 3 Roll No. ....s.se0se0e 29 Sub. Code: LOL9 | 2] 2 Exam. Code: L0[ 0] 21/8) Questions Bachelor of Computer Applications 2™ Semester (2042) OBJECT ORIENTED PROGRAMMING USING C++ Paper—BCA-16-204 Time Allowed : Three Hours] [Maximum Marks : 65 Note :— Attempt one question from each Section (A to D) and the entire compulsory question (Section E). All questions carry equal marks. SECTION—A (a) Differentiate between Abstraction and Encapsulation. What are the advantages of new operator over malloc)? 7 (b) Describe in brief: @ Use of reference variable Gi) Typeccasting “6 What are objects and how are they created ? How is memory allocated for them ? Write a sample program to demonstrate this. 13 0922/PQ-14906 1 [Turn over SECTION—B Describe the scenario in which operator overloading should be “implemented. List the benefits achieved. Write a program to calculate distance between two coordinate points. General mathematical formula is - sqrt ((x2-x1) + (y2-y1)’) 13 (a) Data hiding features of OOPS does not allow to: access private data of another class directly. How does friend function make it possible ? Demonstrate with an example. 7 (b) How is a constructor function different from an ordinary function ? Ifa constructor is declared inline, how does compiler optimize it ? 6 SECTION—C (a) _ In what ways are inheritance and polymorphism related ? Differentiate between protected and private members in context of inheritance. 7 (b) Describe the ambiguity that may arise in multiple inheritance. . 6 How does a virtual function help achieve runtime polymorphism ? List the rules for virtual functions. Write a program to show the utility of virtual functions. 13 SECTION—D How is an exception handled in C++ ? What should be placed inside a ‘catch’ block ? How is an exception re-thrown? 13 What are the steps involved in using a file in C++ program ? Discuss various classes available for file operations. 13 0922/PQ-14906 2 SECTION—E -9. Answer the following : (a) List four new operators added by C++ which aid oop. 2 (b) When do we need to use default arguments in a function? 2 (c) Why is it important to have destructors ? 2 (d) What is a virtual base class 2 2 (©) What is the advantage of saving data in binary file format ? 2 () When do we use multiple catch handlers ? 3 0922/PQ-14906 3 5500

You might also like