Cpp-language-question

Level: Beginner

1. Write a program to print "Hello, World!".
2. Write a program to add two integers.
3. Write a program to swap two numbers.
4. Write a program to find the size of int, float, double, and char in your system.
5. Write a program to calculate the sum of all even numbers from 1 to N.
6. Write a program to find the largest of three numbers.
7. Write a program to check if a number is positive, negative, or zero.
8. Write a program to check if a number is even or odd.
9. Write a program to find the factorial of a number.
10. Write a program to print the Fibonacci series up to N terms.
11. Write a program to reverse a number.
12. Write a program to check if a number is a palindrome.
13. Write a program to find the sum of digits of a number.
14. Write a program to find the GCD of two numbers.
15. Write a program to find the LCM of two numbers.
16. Write a program to check if a number is prime.
17. Write a program to print prime numbers between two intervals.
18. Write a program to check if a year is a leap year.
19. Write a program to print all ASCII values and their equivalent characters.
20. Write a program to find the power of a number.
21. Write a program to find the roots of a quadratic equation.
22. Write a program to calculate the area of a circle.
23. Write a program to calculate the area of a rectangle.
24. Write a program to calculate the area of a triangle.
25. Write a program to find the maximum element in an array.
26. Write a program to find the minimum element in an array.
27. Write a program to calculate the sum of elements in an array.
28. Write a program to find the average of elements in an array.
29. Write a program to find the second largest element in an array.
30. Write a program to count the number of even and odd elements in an array.
31. Write a program to copy all elements of one array into another array.
32. Write a program to merge two arrays.
33. Write a program to search an element in an array.
34. Write a program to sort an array in ascending order.
35. Write a program to sort an array in descending order.
36. Write a program to delete an element from an array.
37. Write a program to insert an element in an array.
38. Write a program to print the elements of a matrix.
39. Write a program to add two matrices.
40. Write a program to subtract two matrices.
41. Write a program to multiply two matrices.
42. Write a program to find the transpose of a matrix.
43. Write a program to find the sum of each row and each column of a matrix.
44. Write a program to find the trace of a matrix.
45. Write a program to find the determinant of a matrix.
46. Write a program to find the sum of the diagonal elements of a matrix.
47. Write a program to check if a matrix is symmetric.
48. Write a program to check if a matrix is an identity matrix.
49. Write a program to print the Pascal triangle.
50. Write a program to check if a string is a palindrome.
51. Write a program to find the length of a string.
52. Write a program to reverse a string.
53. Write a program to concatenate two strings.
54. Write a program to copy one string to another string.
55. Write a program to compare two strings.
56. Write a program to find the frequency of a character in a string.
57. Write a program to count the number of vowels and consonants in a string.
58. Write a program to count the number of words in a string.
59. Write a program to convert a string to uppercase.
60. Write a program to convert a string to lowercase.
61. Write a program to find the first occurrence of a character in a string.
62. Write a program to find the last occurrence of a character in a string.
63. Write a program to find the substring of a string.
64. Write a program to find the length of a string using pointers.
65. Write a program to swap two numbers using pointers.
66. Write a program to add two numbers using pointers.
67. Write a program to find the maximum element in an array using pointers.
68. Write a program to find the minimum element in an array using pointers.
69. Write a program to find the length of a string using recursion.
70. Write a program to find the factorial of a number using recursion.
71. Write a program to find the Fibonacci series using recursion.
72. Write a program to find the GCD of two numbers using recursion.
73. Write a program to find the power of a number using recursion.
74. Write a program to print all prime numbers between two intervals using functions.
75. Write a program to find the factorial of a number using functions.
76. Write a program to find the GCD of two numbers using functions.
77. Write a program to find the LCM of two numbers using functions.
78. Write a program to swap two numbers using functions.
79. Write a program to find the maximum element in an array using functions.
80. Write a program to find the minimum element in an array using functions.
81. Write a program to find the length of a string using functions.
82. Write a program to reverse a string using functions.
83. Write a program to concatenate two strings using functions.
84. Write a program to compare two strings using functions.
85. Write a program to find the frequency of a character in a string using functions.
86. Write a program to count the number of vowels and consonants in a string using functions.
87. Write a program to count the number of words in a string using functions.
88. Write a program to convert a string to uppercase using functions.
89. Write a program to convert a string to lowercase using functions.
90. Write a program to find the first occurrence of a character in a string using functions.
91. Write a program to find the last occurrence of a character in a string using functions.
92. Write a program to find the substring of a string using functions.
93. Write a program to print the elements of a matrix using functions.
94. Write a program to add two matrices using functions.
95. Write a program to subtract two matrices using functions.
96. Write a program to multiply two matrices using functions.
97. Write a program to find the transpose of a matrix using functions.
98. Write a program to find the sum of each row and each column of a matrix using functions.
99. Write a program to find the trace of a matrix using functions.
100. Write a program to find the determinant of a matrix using functions.

Intermediate Level: View

Advanced Level: View