A.
Basics (Syntax, Variables, Operators, Input/Output) –
50 Questions
1. Write a program to print "Hello, World!"
2. Print your name, age, and city.
3. Swap two numbers using a temporary variable.
4. Swap two numbers without using a third variable.
5. Find the ASCII value of a character.
6. Convert temperature from Celsius to Fahrenheit.
7. Convert temperature from Fahrenheit to Celsius.
8. Calculate the area of a circle given the radius.
9. Calculate the perimeter of a rectangle.
10.Check whether a number is even or odd.
11.Check whether a number is positive, negative, or zero.
12.Find the largest of two numbers.
13.Find the smallest of two numbers.
14.Add two numbers without using + operator.
15.Multiply two numbers without using * operator.
16.Print the multiplication table of a number.
17.Calculate simple interest.
18.Calculate compound interest.
19.Check whether a year is a leap year or not.
20.Find the roots of a quadratic equation.
21.Convert seconds to hours, minutes, and seconds.
22.Calculate BMI from height and weight.
23.Print the sum of the first N natural numbers.
24.Print the sum of the first N even numbers.
25.Print the sum of the first N odd numbers.
26.Reverse a number.
27.Find the sum of the digits of a number.
28.Count the digits of a number.
29.Print the last digit of a number.
30.Print the first digit of a number.
31.Check if a number is divisible by 5 and 11.
32.Find the square of a number without using *.
33.Find the cube of a number.
34.Convert a character to uppercase.
35.Convert a character to lowercase.
36.Print ASCII table from 0 to 127.
37.Print alphabets A–Z using a loop.
38.Print alphabets a–z using a loop.
39.Check if a character is a vowel or consonant.
40.Check if a character is a digit or not.
41.Check if a character is an alphabet or not.
42.Print the reverse of a string.
43.Count the number of vowels in a string.
44.Count the number of words in a sentence.
45.Find the length of a string without using built-in functions.
46.Concatenate two strings without using built-in functions.
47.Compare two strings without using built-in functions.
48.Check if a string is palindrome.
49.Check if two strings are anagrams.
50.Remove all spaces from a string.
B. Control Statements & Loops (Logic Building) – 50
Questions
51.Print all even numbers between 1 and 100.
52.Print all odd numbers between 1 and 100.
53.Print all prime numbers between 1 and N.
54.Check whether a number is prime or not.
55.Find the sum of prime numbers up to N.
56.Find the factorial of a number.
57.Print Fibonacci series up to N terms.
58.Check if a number is Fibonacci or not.
59.Find LCM of two numbers.
60.Find GCD (HCF) of two numbers.
61.Check whether a number is Armstrong number.
62.Print all Armstrong numbers between 1 and 1000.
63.Check whether a number is palindrome.
64.Print all palindrome numbers between 1 and 1000.
65.Find the power of a number without using built-in function.
66.Calculate sum of series 1 + 1/2 + 1/3 + … + 1/n.
67.Calculate sum of squares of first N natural numbers.
68.Calculate sum of cubes of first N natural numbers.
69.Print pyramid star pattern.
70.Print inverted pyramid star pattern.
71.Print right-angled triangle star pattern.
72.Print diamond star pattern.
73.Print Pascal’s triangle.
74.Print Floyd’s triangle.
75.Print multiplication table from 1 to 10.
76.Count how many digits are even in a number.
77.Count how many digits are odd in a number.
78.Print all factors of a number.
79.Find the sum of factors of a number.
80.Check whether a number is perfect number.
81.Print all perfect numbers from 1 to 1000.
82.Check whether a number is strong number.
83.Print all strong numbers from 1 to 1000.
84.Print all numbers divisible by 7 but not divisible by 5 (1–100).
85.Check whether a number is Harshad (Niven) number.
86.Print all Harshad numbers between 1–100.
87.Print reverse pyramid of numbers.
88.Print hollow square pattern.
89.Print X pattern with stars.
90.Print cross pattern with numbers.
91.Generate prime factors of a number.
92.Find largest prime factor of a number.
93.Check if a number is automorphic.
94.Check if a number is Kaprekar number.
95.Generate random numbers and print them.
96.Number guessing game.
97.Print calendar for a given month (basic).
98.Print sum of digits until single digit (digital root).
99.Print binary equivalent of a number.
100. Print octal and hexadecimal equivalent of a number.
C. Arrays & Strings – 50 Questions
101. Find maximum element in an array.
102. Find minimum element in an array.
103. Find second largest element in an array.
104. Find second smallest element in an array.
105. Sort an array in ascending order.
106. Sort an array in descending order.
107. Reverse an array.
108. Rotate array to the left.
109. Rotate array to the right.
110. Check if array is sorted.
111. Merge two arrays.
112. Find union of two arrays.
113. Find intersection of two arrays.
114. Find duplicate elements in an array.
115. Remove duplicates from an array.
116. Count frequency of each element in an array.
117. Find missing number in an array (1–N).
118. Find pair of numbers with given sum.
119. Find triplet with given sum.
120. Check if array contains a subarray with sum 0.
121. Move all negative numbers to one side.
122. Find maximum subarray sum (Kadane’s algorithm).
123. Find equilibrium index in array.
124. Find majority element in array.
125. Find median of array.
126. Find mode of array.
127. Print all subsets of an array.
128. Print all permutations of an array.
129. Spiral print of a 2D array.
130. Transpose of a matrix.
131. Multiply two matrices.
132. Add two matrices.
133. Subtract two matrices.
134. Find determinant of a matrix.
135. Find inverse of a matrix.
136. Check if matrix is symmetric.
137. Check if matrix is identity matrix.
138. Print boundary elements of matrix.
139. Print diagonals of a matrix.
140. Sum of diagonals of a matrix.
141. Count vowels in a string.
142. Count consonants in a string.
143. Count digits in a string.
144. Count special characters in a string.
145. Reverse words in a sentence.
146. Capitalize first letter of each word.
147. Check if string contains only digits.
148. Remove vowels from a string.
149. Replace spaces with hyphens.
150. Find longest word in a sentence.
D. Advanced/Complex (Recursion, OOP, Logic Puzzles) –
50 Questions
151. Factorial using recursion.
152. Fibonacci using recursion.
153. Sum of digits using recursion.
154. Reverse number using recursion.
155. Check palindrome using recursion.
156. Find power of number using recursion.
157. Find GCD using recursion.
158. Tower of Hanoi problem.
159. N-Queens problem.
160. Generate all permutations of a string.
161. Generate all subsets of a string.
162. Find longest palindrome substring.
163. Find longest common prefix of strings.
164. Implement binary search (iterative).
165. Implement binary search (recursive).
166. Implement linear search.
167. Implement bubble sort.
168. Implement selection sort.
169. Implement insertion sort.
170. Implement quick sort.
171. Implement merge sort.
172. Implement heap sort.
173. Implement counting sort.
174. Implement radix sort.
175. Implement binary tree (insertion, traversal).
176. Inorder, Preorder, Postorder traversal.
177. Find height of a binary tree.
178. Count nodes in a binary tree.
179. Find leaf nodes in binary tree.
180. Check if two trees are identical.
181. Lowest common ancestor in binary tree.
182. Implement stack using array.
183. Implement stack using linked list.
184. Implement queue using array.
185. Implement queue using linked list.
186. Implement circular queue.
187. Implement priority queue.
188. Implement linked list (insert, delete, display).
189. Detect loop in linked list.
190. Reverse a linked list.
191. Find middle of linked list.
192. Merge two sorted linked lists.
193. Implement hash table.
194. Implement binary search tree.
195. Implement graph using adjacency matrix.
196. Implement graph using adjacency list.
197. BFS traversal of graph.
198. DFS traversal of graph.
199. Dijkstra’s shortest path algorithm.
200. Kruskal’s Minimum Spanning Tree algorithm.