2069 Chaitra Regular engineering note
2069 Chaitra Regular Object-Oriented Programming IOE Pulchowk engineering note
1. What are the characteristics of OOP? How does the OOP differ from POP? Use object-oriented
programming technique,. write a program to create a class vector that reads integer numbers. Perform vector addition by passing an object as an argument and returns the object as a result. A vector is a class with an array as a member.
2. What is the significance of using inline function? Describe with a suitable example. What do you mean by default argument? How can you relate the default argument with function overloading? Describe with a suitable example.
3. Define constructor and destructor. Write down different types of constructors with syntax. Create a class mdistance to store the values in meter and centimeter and class edistance to store Perform addition of object of distance and object of resistance by using friend function. values in feet and inches.
4. Why do we need operator overloading? How can you overload operators using member function and non-member function? Write a program to overload relational operators (==, !=, >, < >=,<=) to compare complex numbers.
5. How do different types of derivation affect the members of the class? Write down the types of inheritance. What kind of problem is encountered in multipath inheritance? Write down its solution with a suitable example.
6. Write down the different techniques for formatting I/O stream with example. Explain the different errors encountered during file operation.
7. Explain the need for virtual function with suitable example What do you mean by run-time type information (RTTI)? How dynamic cast and type operators are used to achieve RTTI?
8. Define the class template and function template with respective syntax. What are the different exception handling techniques in C++? Explain with an appropriate example.
0 Comments:
Post a Comment
Please don't enter any spam link in the comment box