0% found this document useful (0 votes)
59 views3 pages

Experiment List

Uploaded by

itzinnovator01
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)
59 views3 pages

Experiment List

Uploaded by

itzinnovator01
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/ 3

EXPERIMENT LIST OOPS

1.write a C++ program to evaluate the following expression.


−𝑏±√𝑏2 −4𝑎𝑐 −𝑏±√𝑏2 −4𝑎𝑐
𝑥1 = ,𝑥2 =
2𝑎 2𝑎

2.Write a C++ program to check whether a number is palindrome or not.

3. Write a C++ program to print 100 to 1.

4.Write C++ program which will print (half pyramid) pattern of natural number.

5.Find the smallest and second smallest elements in an array.

6.Write a C++ program to find Transport of a 2*2 Matrix.

7.Write a C++ program to declare a class “staff” having data members name, basic

salary, DA, HRA< and calculate gross salary. Accept and display data for one staff.

a. Where DA=74.5%of basic

i. HRA=30% of basic

ii. Gross_ salary=basic+HRA=DA

8.Write a C++ program to define a class “City” having data member name,

population. Accept and display data for 10 cities.


9. Write a C++ program to create “Number” having data member’s x and y and

perform mathematical operations like addition, subtraction, multiplication and

division on two number using inline function.

10.Write a C++ program to define a class “Number” having data member’s x and y

and perform mathematical operations like addition, subtraction, multiplication

and division on two number using constructor and destructor function.

11.Write a C++ program to define a class “Student” having data member roll_no,

name. Derive a class “Marks” from “Students” having data members m1, m2, m3,

total and percentage. Accept and display data for one student.

12. Write a C++ program to define a class “Employee” having data members

emp_no, emp_name and emp_designation. Derive a class “Salary” from

“Employee” having data members basic, hra,da, gross_sal. Accept and display

data for one employee.

13.Write a C++ program to declare a class “Book” containing data members

book_name , auther_name, and price . Accept this information for one object of

the class using pointer to that object.


14.Write a C++ program to declare a class birthday having data member’s day,

month, years. Accept this information for five objects using pointer to the array of

objects.

15.Write a C++ program declare a class “polygon” having data member’s width

and height Derive classes “rectangle” and “triangle” from “polygon” having area ()

as a member function. Calculate area of triangle and rectangle using pointer to

derived class object.

16.Write a C++ program to interchange the values of two int, float and char using

function overloading.

17.Write a C++ program to Reads and Display File’s Content.

18.Write a C++ program merge two files.

You might also like