Solution to 18CS45 OOC Module 1 Question Bank

 

Solution to 18CS45 OOC Module 1 Solved Question Bank

Here you can find the solution to the 18CS45 OOC Module 1 Question Bank.

1. List out the difference between a procedure-oriented program and an object-oriented program. Jan.-18, 19, Marks 5

2. Give the difference between procedure-oriented programming and object-oriented programming. July-19, Marks 4

3. Explain the concept of object-oriented program i) Encapsulation ii) Polymorphism iii) Inheritance iv) Data initialization Jan.-18, Marks 8

4. List and explain any four features of an object-oriented program. Jan.-19, Marks 5

5. Explain the various features of OOC. July-19, Marks 8

6. State the important features of the Object-Oriented programming paradigm. July-18, Marks 8

7. What is a reference variable? Explain. Write a C++ program to swap two integer values and display the values before and after swapping. Jul.-17, Marks 5

8. Explain function prototyping with an example. Jan.-18, Jul-18  Marks 5

9. What is polymorphism? Write a C++ program using the overloaded function area to find the area of a square, circle, and rectangle. Jul.-17, Marks 6

10. Define function overloading and Write a C++ program to find the areas of the circle (PI * r * r), rectangle (l * b), and square (x * x) by getting the r, l, b, and x through the keyboard and printing the areas on the console using the method area() by applying the concept of function overloading. July 18, Marks 8.

11. What is Function Overloading? Write a C++ program to define three overloaded functions to find the sum of two integers, the sum of two floating-point numbers, and the sum of three integers. Jan.-19, Marks 7

12. Explain function overloading with an example. Jan.-18, Marks 5

13. Write a short note on function overloading. July-19, Marks 4

14. Explain how one can bridge two classes using the friend function. Write a C++ program to find the sum of two numbers using the bridge friend function add().Jul.-17, Marks 6

15. What are static members of a class? Write a C++ program to count the number of objects created. Jul.-17, Marks 5

16. Define a friend function. Illustrate with an example.  Jan-19, Marks 5

17. What is the inline function? Write a C++ program to find the maximum of two numbers using the inline function. July-19, Marks 8

18. Define a Student class with the following measures: Data Members: RollNo, Name, average marks Member function: to read the data, to print the data. Write a C++ program to read the data of 10 students and print the 10 students’ information.  July-17, Marks 5

19. How does namespace help in preventing pollution of the global namespace? July-17, Jan.-18, Marks 4

20. Explain namespace, with an example. July-18, Marks 4

21. Write a C++ program to get the employee details (empno, empname, bsalary (initialized to 1000 by constructor) and allowance) of the Employee class through the keyboard using the method GetData() and display them using the method DispData() on the console in the format empno, empname, bsalary,allowance. VTU : July-18, Marks 8

22. What is a constructor? List the different types of constructors and explain the default constructor with an example. Jan.-18, Marks 6

23. What is a constructor? Mention its types. Explain parameterized constructor with an example.  Jan.-19, Marks 6

24. What is a constructor? Mention its type. Explain the parameterized constructor with a suitable code.  July-19, Marks 8

25. Write a C++ program to define an Employee class with the following Members: Data  Members: empid, emp salary Member Functions: to read a data and to print the data. The program should use an array within the class to read 3 employee information and print the 3 employee information.

The solution to 18CS45 OOC Module 1 Solved Question Bank

The solution to 18CS45 OOC Module 2 Solved Question Bank

The solution to 18CS45 OOC Module 3 Solved Question Bank

The solution to 18CS45 OOC Module 4 Solved Question Bank

The solution to 18CS45 OOC Module 5 Solved Question Bank

18CS45 Object-Oriented Concepts VTU CBCS Notes

Summary:

This article provides the solution to the 18CS45 OOC Module 1 Solved Question Bank. If you like the tutorial share it with your friends. Like the Facebook page for regular updates and YouTube channel for video tutorials.