0% found this document useful (0 votes)
11 views

c ++ Assignment[1]

The document outlines a series of C++ programming assignments, including tasks such as converting Fahrenheit to Celsius, computing Fibonacci series, checking for prime numbers, and generating random numbers. Additional assignments involve matrix operations, string manipulations, and demonstrating concepts like polymorphism and operator overloading. The document is structured into multiple assignments, each with specific programming challenges for students to complete.

Uploaded by

ayra56878
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views

c ++ Assignment[1]

The document outlines a series of C++ programming assignments, including tasks such as converting Fahrenheit to Celsius, computing Fibonacci series, checking for prime numbers, and generating random numbers. Additional assignments involve matrix operations, string manipulations, and demonstrating concepts like polymorphism and operator overloading. The document is structured into multiple assignments, each with specific programming challenges for students to complete.

Uploaded by

ayra56878
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 5

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.

ii.Multiply 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.


13.Write 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 correctly.Use 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

You might also like