The document is an index of C and C++ programming exercises, listing 36 different programs with brief descriptions of their functionalities. The programs cover various topics including mathematical calculations, control structures, classes, inheritance, and operator overloading. Each entry includes a serial number and a placeholder for the teacher's signature.
The document is an index of C and C++ programming exercises, listing 36 different programs with brief descriptions of their functionalities. The programs cover various topics including mathematical calculations, control structures, classes, inheritance, and operator overloading. Each entry includes a serial number and a placeholder for the teacher's signature.
No. Signature 1. Write a c++ program to find simple interest and compound interest. 2. Write a c++ program to convert temperature from Fahrenheit to Celsius. 3. Write a c++ program to generate a multiplication table of given number using for loop. 4. Write a c++ program to find factorial of given number using a do-while loop. 5. Write a c++ program to find Fibonacci series up to nth terms. 6. Write a c++ program to find whether inserted year is leap year or not. 7. Write a program to find whether given number is prime or not. 8. Write a c++ program to input three numbers and find the largest using relational and logical operators. 9. Write a c++ program to input marks and print the grade based on the following conditions: • Marks >= 90: Grade A • Marks >= 75: Grade B • Marks >= 50: Grade C • Marks < 50: Fail 10. Create a menu-driven c++ program using the switch statement to perform basic arithmetic operations (Addition, Subtraction, Multiplication, and Division). 11. Write a c++ program to input a day number (1-7) and print the corresponding day of the week using the switch statement. 12. Write a single c++ program to perform following tasks using if. Else, loop and single dimension integer array: a) Sort the elements. b) Find greater number and average. 13. Write a single c++ program to perform following tasks using if, Else, loop and double dimension integer array of size 3x3: a) Addition of two matrix. b) Subtraction of two matrix. c) Multiplication of two matrix. 14. Write a c++ program of swapping two numbers and demonstrates call by value and call by reference. 15. Write a c++ program to return the largest of three numbers using return by reference. INDEX OF C & C++ S.No. List of The Programs Page Teacher’s No. Signature 16. Write a c++ program to use an inline function for calculating the area of a circle and a rectangle. 17. Write a c++ program to calculate the perimeter of a rectangle, ensuring the dimensions remain constant in the function 18. Write a c++ program overloaded functions to calculate the area of a circle, rectangle, and triangle. 19. Write a c++ program to create a class Rectangle with data members for length and width, and member functions to calculate and display the area and perimeter. 20. Write a c++ program to store and display details of 5 employees (ID, name, salary) using an array of objects. 21. Write a c++ program where a friend function calculates the average of marks of a student, accessing private members of a Student class. 22. Write a c++ program to create a class Circle with a parameterized constructor to initialize the radius and calculate the area. 23. Write a c++ program to copy the details of a student (roll number, name, marks) from one object to another using a copy constructor. 24. Write a c++ program to count the number of objects created and destroyed using constructors and destructors. 25. Write a c++ program to overload the unary ++ and -- operator to increment and decrement the value of a private data member. 26. Write a c++ program to overload the + operator to add two complex numbers using a class Complex. 27. Write a c++ program to overload the * operator to multiply two matrices using a class Matrix. 28. Write a c++ program to create a class String and overload the + operator to concatenate two strings. 29. Write a c++ program to create a class Distance that converts a float value representing kilometers into meters and centimeter. 30. Write a c++ program to convert objects of a Fahrenheit class to a Celsius class using operator overloading. 31. Write a c++ program to demonstrate multilevel inheritance with a base class Shape (basic properties), derived class Rectangle (length and width), and further derived class Cuboid (height). INDEX OF C & C++ S.No. List of The Programs Page Teacher’s No. Signature 32. Write a c++ program to handle data from two base classes Person (personal information) and Employee (job details) using a derived class Manager. 33. Write a c++ program to demonstrate hierarchical inheritance where a base class Animal has derived classes Dog, Cat, and Bird, each with specific methods. 34. Write a c++ program to create an abstract class Shape with a pure virtual function calculateArea() and derived classes Circle and Rectangle that implement the function. 35. Write a c++ program to demonstrate the use of a pointer to an object by creating a class Student with data members for roll number and name. Use a pointer to access and modify object data. 36. Write a c++ program to use the this pointer to return the current object from member functions in a ChainedFunction class that supports method chaining.