0% found this document useful (0 votes)
19 views1 page

Assg2 OOP

Uploaded by

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

Assg2 OOP

Uploaded by

Maniya Daxit
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1

Object Oriented Programming (C++) SY BCA SEM – III Asst. Prof. Viral S.

Patel

Objective Questions (2 marks)


1. What is default constructor ?
2. What is copy constructor ?
3. What is the advantage of new over malloc ?
4. Define Destructor. How can you invoke a destructor ?
5. What is significance of new and delete ?
6. What is constructor with default argument ?
---------------------------------------------------------------------------------------------------------------------------
7. List out the operators that cannot be overloaded as member and friend function.
8. What do you mean by operator overloading ? Give Syntax for it.

Long Questions :
1. List memory management operators. Point out reasons why using new is better idea than
using malloc() ? (5)
2. What do you mean by default argument ? When it is useful ? (5)
3. What is destructor ? How destructor get called ? Also describe the importance of destructor.
(5)
4. What is constructor ? How do we call a constructor ? State the advantages of constructor.
(7)
5. Define constructor. Explain default and copy constructor. (7)
6. Explain parameterized constructor. (5)
(5&6 : What is constructor ? Explain different types of constructor.(7) )
7. Write a program to create a class scale. Define two variable feet and inches. Define member
function getscale, putscale and sum function to add to measure passed object as argument
to the function sum. (7)
---------------------------------------------------------------------------------------------------------------------------
8. What is conversion function ? How it is created ? Explain with example. (5)
9. Differentiate between Unary and Binary operator overloading. (7)
10. What is overloading of an operator ? When it is necessary to overload an operator ?
11. Write rules for operator overloading. Give example. (6)
12. How many arguments are required in the definition of an overloaded unary operator ? Why
? (7)
13. How many arguments are required in the definition of an overloaded binary operator ? Why
? (7)
14. What is type conversion ? Explain basic to class type with proper example. (7)
15. Explain different types of type conversion. (5)
16. Explain basic to class and class to basic type conversion. (7)

By Asst. Prof. Viral S. Patel

You might also like