OOPS Practice Questions Done
OOPS Practice Questions Done
OOPS Practice Questions Done
Accept data for eight accounts and display details of accounts having balance less than 10,000.(Done)
18. Write a C++ program to declare a class student with members as roll no, name and department.
Declare a parameterised constructor with default value for department as ‘CO’ to initialize
members of object. Initialize and display data for two students. (Done)
19. Describe following terms: Inheritance, data abstraction, data encapsulation, dynamic binding.
20. Describe concept of type casting using suitable example.
21. Write any two characteristics of static data member. Write C++ program to count number of
objects created with the help of static data member. (Done)
22. Write a C++ program to swap the values of two variables using friend function. (Done)
23. Describe visibility modes and their effects used in inheritance.
24. Write a C++ program to find the area of rectangle using class rectangle which has following details
– a) Accept length and breadth from the user. b) Calculate the area.
c) Display the result. (Done)
25. Write a C++ program to display the sum of array elements of size n. Take the array elements as
input from the user.(Done)
29. Write a C++ program to find factorial of given number using loop (Done)
30. Write a C++ program to find smallest number from two numbers using friend function. (Hint: use
two classes). (Done)
31. Write a C++ program to declare a class student with data members as roll no and name. Declare a
constructor to initialize data members of class. Display the data. (Done)