C Programming Base Building Questions
with Solutions
Level 1: Basics & Flow Control
1. 1. Print Hello World
2. 2. Sum of two numbers
3. 3. Even or odd check
4. 4. Largest of three numbers
5. 5. Simple calculator (+, -, *, /)
6. 6. Swap two numbers (using temp and without temp)
7. 7. Factorial of a number
8. 8. Prime number check
9. 9. Multiplication table
10. 10. Count digits in a number
Level 2: Loops & Patterns
11. 1. Print patterns (star, number pyramid)
12. 2. Reverse a number
13. 3. Palindrome number
14. 4. Fibonacci series
15. 5. Armstrong number
16. 6. GCD and LCM
17. 7. Power of a number
18. 8. Sum of digits
19. 9. Binary to decimal
20. 10. Decimal to binary
Level 3: Arrays & Strings
21. 1. Find max/min in array
22. 2. Reverse array
23. 3. Sum and average of array
24. 4. Search an element in array
25. 5. Merge two arrays
26. 6. Frequency of elements
27. 7. Left/right rotate array
28. 8. Remove duplicates from array
29. 9. Sort array (Bubble, Insertion)
30. 10. Count vowels and consonants in string
31. 11. Reverse a string
32. 12. Palindrome string
33. 13. Compare two strings
34. 14. Find substring in string
35. 15. Convert lowercase to uppercase
Level 4: Pointers & Functions
36. 1. Pointer basics (print address & value)
37. 2. Swap using pointers
38. 3. Array using pointers
39. 4. String using pointers
40. 5. Function with return
41. 6. Function with pointer argument
42. 7. Recursion: factorial, fibonacci, sum of digits
43. 8. Call by value vs call by reference
44. 9. Pointer to pointer
45. 10. Dangling pointer example
Level 5: Structures & Memory
46. 1. Define and access struct
47. 2. Array of structures
48. 3. Structure with pointer
49. 4. Pass structure to function
50. 5. Nesting of structures
51. 6. Dynamic memory allocation with malloc
52. 7. calloc vs malloc
53. 8. free memory
54. 9. Linked list node creation (manually)
55. 10. Create, display simple linked list