Sunday, August 31, 2025
11 STD- C++ PROGRAMS WITH ANSWER
C++ Program Questions - Dev C++ Solutions
C++ Program Questions and Solutions (Dev C++)
Select a Question:
-- Select Question --
1. Write a while loop that displays numbers 5, 10, 15, ... 50.
2. Write a for loop that displays the number from 21 to 30.
3. Write a C++ program to print the following series: 1, 3, 5, 7 ... 75.
4. Write a C++ program to find the sum of numbers from 1 to 10 using a for loop.
5. Write a C++ program to print the multiplication table of a given number using a for loop.
6. Write a C++ program to display numbers from 1 to 10, except 5, using for and continue statements.
7. Write a C++ program to display numbers from 5 to 1 using a do-while loop.
8. Write a C++ program to reverse an integer number entered by the user.
9. Write a C++ program to print the sum of a series: S = 1 + x + x² + ... + xⁿ.
10. Write a C++ program to sum numbers from 1 to 10 using recursion.
11. Write a C++ program to display the reverse of a number and check if it is a palindrome.
12. Write a C++ program to print an array of strings.
14. Write a C++ program to calculate the difference between two matrices.
15. Write a C++ program to display standard input/output operations using cin and cout.
16. Write a C++ program to demonstrate constructor and destructor execution order.
17. Write a C++ program that uses strcmp() function for string comparison.
18. Write a C++ program to demonstrate function overloading.
19. Write a C++ program that implements operator overloading.
20. Write a C++ program to implement class inheritance and display its functionality.
21. Write a C++ program to create a class and define member functions inside and outside the class.
22. Write a C++ program to create a class Shape, derive a class Rectangle from it, and calculate the area.
26. Write a C++ program to illustrate the use of the setw() format manipulator.
27. Write a C++ program to demonstrate the use of isalpha(), isdigit(), and isalnum() functions.
28. Write a C++ program to calculate the area of a rectangle using a constructor.
29. Write a C++ program to demonstrate call by value and call by reference.
30. Write a C++ program to accept and display student details using multiple classes and inheritance.
Export to PDF
Share
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment