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

CPP Pyq

Uploaded by

Maroof Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
0% found this document useful (0 votes)
24 views

CPP Pyq

Uploaded by

Maroof Ali
Copyright
© © All Rights Reserved
Available Formats
Download as PDF or read online on Scribd
You are on page 1/ 5
ROW Nein. [ Total No. of Pages : 3 BC(H)-2001 B. C. A. (A) (Third Semester) EXAMINATION, 2020 OBJECT ORIENTED PROGRAMMING USING C++ Time : Three Hours Maximum Marks : 70 Note: Attempt questions from both Sections as directed. Section—A (Short Answer Type Questions) : Note : Attempt any seven questions. Each question carries 4 marks. 7x4=28 1. What is Inline Function ? List the advantages and disadvantages of inline function. P.T.O. wer 7 BC(H)-2001(N) A (2) Explain the Scope Resolution Operator with Suitable example. 3. Explain the this pointer with suitable example. 4. Explain the need of an abstract class with suitable example. What is the need of copy constructor ? Explain. Differentiate between function overriding and function overloading with a suitable example. 7. Explain the different visibility mode in C++. Explain the static member of a class with a suitable example. Differentiate between Default and Default Argument Constructor with a suitable examples. 10. Explain the different file modes with a suitable examples. (c-11) rrr BC(H)-2004(N) (31 Section—B (Long Answer Type Questions) Note : Attempt any fvo questions. Each question carries 21 marks. 2x21=42_. A Write down the rules of operator overloading. © ‘ Write a program in C++ to overload an “>” — (greater than) operator. Discuss the relation of virtual function with the pure virtual function. Where is it used ? WAP in C++ to implement pure virtual function. ie Write a program in C++ to add some records in a Stock file and Display the ‘contents of stock- file. Also modify the contents of file. . , What is the need of Exception Handling 2 Write a progtam in C++ to shows a simple example where multiple catch statements are used to handle various types of exceptions. BC(H)-2001(N) 170 (c-11) 121 1BC(H)-2001 2, Explain. the Abstract class with suitable example. 3. Explain this pointer with the suitable examples. 4, Differentiate the function overloading with the function overriding with a suitable example. a Explain the concept of default argument constructor and default constructor with a suitable example. 6. Discuss the ambiguity in inheritance. 7. Explain the ‘static data member and function with the suitable example. 8. How to call the base class constructor through the derived class constructor ? Explain with a suitable example. £9. Explain seckp(), seckg( ), tellp( ) and tellg( ) function with a suitable example. 10, What is the need of Virtual Base Class ? Explain with a suitable example. | _ BC(H)-2001 131 Section—B (Long Answer Type Questions) Note : Attempt any three questions. Each question carries 14 marks. 3%14=42 1. What is operator overloading ? Write down the rules of operator overloading. Write a program in C++ to overload “= =” (equal to) operator. 2. What is a friend function ? Where is it used ? Write a program in C+ in which a function of class A is friend function of class B and class C. . Explain the different file modes which are used in creating a file. Write a program in C++ to create a file and display its contents on the screen. Also modify the contents of file. What is the need of a virtual function ? Discuss the relation of virtual function with the polymorphism with a suitable program. 150

You might also like