×

C++ Programs

C++ Most popular & Searched Programs

C++ Basic I/O Programs

C++ Constructor & Destructor Programs

C++ Manipulators Programs

C++ Inheritance Programs

C++ Operator Overloading Programs

C++ File Handling Programs

C++ Bit Manipulation Programs

C++ Classes & Object Programs

C++ Class and Object Programs / Examples (Set 2)

In C++ programming, a class is a blueprint for the object, it is a user-defined data type where we can define our own data type with data members and member functions like a real-life object.

This section contains the C++ programs based on the Class and Object approach. Each program has the solved code, output, and explanation.

List of C++ Class and Object Programs / Examples

  1. C++ program to find the factorial of a number using class
  2. C++ program to check the year is leap year or not using class
  3. C++ program to add N natural numbers using class
  4. C++ program to find the largest number between three numbers using class
  5. C++ program to check if the character is vowel or consonant using class
  6. C++ program to check if the number is odd or even using class
  7. C++ program to find the power of a number using class
  8. C++ program to check if the number is palindrome using class
  9. C++ program to find the reverse of a number using class
  10. C++ program to change the string from uppercase to lowercase using class
  11. C++ program to check the number is Armstrong number or not using class
  12. C++ program to find the largest number of an array using class
  13. C++ program to count vowels, consonant, digits and special characters in string using class
  14. C++ program to find the length of a string using class
  15. C++ program to find the addition of two matrices using class
  16. C++ program to find the multiplication of two matrices using class
  17. C++ program to find transpose of a matrix using class
  18. C++ program to find all roots of a quadratic equation using class
  19. C++ program to convert binary number to octal number using class
  20. C++ program to convert octal number to binary number using class
  21. C++ program to convert decimal number to octal number using class
  22. C++ program to convert octal number to decimal number using class
  23. C++ program to reverse the string using class
  24. C++ program to change the string from lowercase to uppercase using class
  25. C++ program to change the string to sentence case using class
  26. C++ program to find the smallest number in the array using class
  27. C++ program to sort an array in ascending order using class
  28. C++ program to sort an array in descending order using class
  29. C++ program to convert the temperature from Celsius to Fahrenheit using class
  30. C++ program to convert the temperature from Fahrenheit to Celsius using class
  31. C++ program to print prime numbers in a range using class
  32. C++ program to print odd numbers in a range using class
  33. C++ program to print even numbers in a range using class
  34. C++ program to print Armstrong numbers in a range using class
  35. C++ program to print palindrome numbers in a range using class
  36. C++ program to find the sum of all elements of the array using class
  37. C++ program to find the product of all elements of the array using class
  38. C++ program to find the product of all digits of a number using class
  39. C++ program to find the sum of all digits of a number using class
  40. C++ program to check if the number is perfect or not using class
  41. C++ program to print the perfect numbers in the given range using class
  42. C++ program to convert octal number to hexadecimal using class
  43. C++ program to convert hexadecimal to octal number using class
  44. C++ program to convert hexadecimal to decimal number using class
  45. C++ program to convert decimal number to hexadecimal using class
  46. C++ program to find the second largest number in the array using class
  47. C++ program to find the second smallest number in the array using class
  48. C++ program to change the string to toggle case using class
  49. C++ program to change the string to title case using class
  50. C++ program to count total words in the string using class
  51. C++ program to convert characters of a string to opposite case using class
  52. C++ program to find the mean of the array using class
  53. C++ program to find the median of the array using class
  54. C++ program to find the mode of the array using class
  55. C++ program to find the sum of digits of numbers between numbers using class
  56. C++ program to calculate the minutes between two time periods using class
  57. C++ program to check if the numbers in the array are in arithmetic progression using class
  58. C++ program to convert the minutes to time using class
  59. C++ program to replace a word by another given word in the string using class
  60. C++ program to print the leap years in the given time period using class
  61. C++ program to find the sum of all integers in a string using class
  62. C++ program to find the sum of prime numbers in a range using class
  63. C++ program to find the product of prime numbers in a range using class
  64. C++ program to find the product of digits of numbers between a given range using class
  65. C++ program to find the product of all integers in a string using class
  66. C++ program to check if the numbers in the array are in geometric progression using class
  67. C++ program to find the difference between the largest and smallest numbers in the array using class
  68. C++ program to find the area of shapes using class
  69. C++ program to find the perimeter of shapes using class
  70. C++ program to swap first and last digits of a number using class
  71. C++ program to add two binary numbers using class
  72. C++ program to find the area of polygon of several sides using class
  73. C++ program to find the area of hexagon using class
  74. C++ program to calculate the simple interest using class
  75. C++ program to calculate the compound interest using class
  76. C++ program to find the third angle of triangle using class
  77. C++ program to convert speed from km/h to miles/h using class
  78. C++ program to convert speed from miles/h to km/h using class
  79. C++ program to print the sum of all odd and even numbers in a range using class
  80. C++ program to print the product of all odd and even numbers in a range using class
  81. C++ program to find the volume of shapes using class
  82. C++ program to find the surface area of shapes using class
  83. C++ program to reverse name and surname using class
  84. C++ program to convert the temperature from Celsius to Kelvin using class
  85. C++ program to convert the temperature from Kelvin to Celsius using class
  86. C++ program to convert the temperature from Fahrenheit to Kelvin using class
  87. C++ program to convert the temperature from Kelvin to Fahrenheit using class
  88. C++ program to find area of a triangle by heron's formula using class
  89. C++ program to find the product of the largest number and the smallest number in the array using class
  90. C++ program to find the largest character in the string using class
  91. C++ program to sort the string of characters in ascending order using class
  92. C++ program to sort the string of characters in descending order using class
  93. C++ program to find the smallest character in the string using class
  94. C++ program to find the second largest character in the string using class
  95. C++ program to find the second smallest character in the string using class
  96. C++ program to check if the string is palindrome using class
  97. C++ program to find the sum of the largest number and the smallest number in the array using class
  98. C++ program to check if the string is in alphanumeric using class
  99. C++ program to check if the string is in uppercase using class
  100. C++ program to check if the string is in lowercase using class
  101. C++ program to check if the string is in numeric using class
  102. C++ program to check if the string contains only alphabets using class
  103. C++ program to reverse every word of a string using class
  104. C++ program to identify missing character in string using class
  105. C++ program to print Fibonacci series up to N using class
  106. C++ program to find the quotient and remainder using class
  107. C++ program to convert decimal number to binary using class
  108. C++ program to convert binary to decimal number using class
  109. C++ program to print number and string entered by the user using class
  110. C++ program to check whether the number is prime or not using class
  111. C++ program to find the LCM (Least Common Multiple) of two numbers using class
  112. C++ program to find the GCD (Greatest Common Divisor) of two numbers using class
  113. C++ program to print the table of number entered using class
  114. C++ program to find the sum of adjacent elements of the array using class
  115. C++ program to find the product of adjacent elements of the array using class
  116. C++ program to find the difference of adjacent elements of the array using class
  117. C++ program to find the occurrence of the number in the array using class
  118. C++ program to find the most occurring element in an array of integers using class
  119. C++ program to separate the even and odd numbers in the array using class
  120. C++ program to find the sum of even and odd numbers of the array using class
  121. C++ program to find the product of even and odd numbers of the array using class
  122. C++ program to search an element (number) in array using class
  123. C++ program to sort the array in even-odd form using class
  124. C++ program to merge two arrays using class
  125. C++ program to add two arrays using class
  126. C++ program to find the product of two arrays using class
  127. C++ program to find the sum of two arrays one in reverse using class
  128. C++ program to find the product of two arrays one in reverse using class
  129. C++ program to check whether the matrix is an identity matrix or not using class
  130. C++ program to check if the matrices are equal or not using class
  131. C++ program to find the sum of each row of matrix using class
  132. C++ program to check whether the matrix is a sparse matrix or not using class
  133. C++ program to find the sum of both diagonals of matrix using class
  134. C++ program to find the product of both diagonals of matrix using class
  135. C++ program to find the product of each row of matrix using class
  136. C++ program to find the subtraction of two matrices using class
  137. C++ program to delete an element of an array at any position using class
  138. C++ program to insert an element of an array at any position using class
  139. C++ program to check if the number is ugly or not using class
  140. C++ program to print ugly numbers in a range using class
  141. C++ program to check if the number is abundant or not using class
  142. C++ program to print abundant numbers in a range using class
  143. C++ program to check if the number is deficient or not using class
  144. C++ program to print deficient numbers in a range using class
  145. C++ program to check if the number is kaprekar or not using class
  146. C++ program to print kaprekar numbers in a range using class
  147. C++ program to check if the number is narcissistic or not using class
  148. C++ program to print narcissistic numbers in a range using class
  149. C++ program to check if the number is happy or not using class
  150. C++ program to print happy numbers in a range using class
  151. C++ program to check if the number is disarium or not using class
  152. C++ program to print disarium numbers in a range using class
  153. C++ program to check if the number is pronic or not using class
  154. C++ program to print pronic numbers in a range using class
  155. C++ program to check if the number is automorphic or not using class
  156. C++ program to print automorphic numbers in a range using class
  157. C++ program to convert the number from integer to roman using class
  158. C++ program to convert the number from roman to integer using class
  159. C++ program to find the sum of each column of matrix using class
  160. C++ program to find the product of each column of matrix using class
  161. C++ program to count total occurrences of each element in an array using class


Comments and Discussions!

Load comments ↻





Copyright © 2024 www.includehelp.com. All rights reserved.