ASSIGNMENT 1 :-
1. Write a C++ Program to convert Fahrenheit temperature to Celsius.
2. Write a C++ Program to compute Fibonacci series.
3. Write a C++ Program to check whether a number is prime or not.
4. Write a C++ Program to generate random number.
5. Write a C++ Program to input student data and generate merit.
6. Write a C++ Program to find the Max of 3 numbers.
7. Write a C++ Program to swap 2 numbers:
a. Using third variable.
b. Without using a third variable.
8. Write a C++ Program to read the values and sort the values entered by
user. (n can be any value(atleast 10)).
9. Write a C++ Program to perform the following:
i. Add 2 matrices.
[Link] 2 matrices. iii. Find transpose of a specific
matrix.
10. Write a C++ Program to find if the string entered by the user is a
palindrome or not.
11. Write a C++ program to perform the following:
i. Create uninitialised string object. ii.
Create object with string constant.
iii. Concatenate 2 strings. iv. Display the length of strings(both the
individual strings and concatenated string).
12. Write a C++ Program to find the length of 2 initialized Strings.
[Link] a C++ Program to overload redirection operators (<<,>>),string
comparision operator(==) and multiplication operator(*). You can also
create this as a menu driven program.
14. Write a C++ Program that shows how to use a common friend function to
swap the private values of two classes.
ASSIGNMENT 2 :-
8.8 Write a C++ program to compute the result of MCA students by inputting data
in Base class 1, marks in Derived class 1 and computing the result in Derived class 2.
8.9 Write a function power to raise a number m to the power n (the function takes
a double value for m and int value for n ) and returns the result [Link] a
default value of 2 for n to make the function calculate squares when this argument
is omitted by the user :
a) Write a main() that gets the value of m and n from the user to test this function.
b) Redo this assignment using friend function.
ASSIGNMENT – 3
1. Write a c++ program to concatenate two strings using run-time
polymorphism.
2. Write a c++ program to show the use of virtual. (Program 9.12 E-
Balaguruswamy)
3. Write a c++ program to illustrate runtime polymorphism.(Program 9.13 E-
Balaguruswamy)
ASSIGNMENT – 4