Practice 30 Top C Programming Questions on Numbers
Q1. Write a program to check whether a number is positive, negative, or zero.
Q2. Write a program to determine whether a given number is even or odd.
Q3. Write a program to find the sum of the digits of a given number.
Q4. Write a program to reverse a given number.
Q5. Write a program to find the largest of three numbers.
Q6. Write a program to check whether a number is a prime number.
Q7. Write a program to find the factorial of a given number.
Q8. Write a program to generate the Fibonacci sequence up to a given number.
Q9. Write a program to find the greatest common divisor (GCD) of two numbers.
Q10. Write a program to check if a number is an Armstrong number.
Q11. Write a program to find the least common multiple (LCM) of two numbers.
Q12. Write a program to calculate the sum of the first N natural numbers.
Q13. Write a program to find the sum of the squares of the first N natural numbers.
Q14. Write a program to find the sum of the cubes of the first N natural numbers.
Q15. Write a program to check whether a number is a palindrome.
Q16. Write a program to check whether a number is a perfect number.
Q17. Write a program to count the number of digits in a number.
Q18. Write a program to check whether a number is a power of 2.
Q19. Write a program to calculate the power of a number using a loop.
Q20. Write a program to calculate the average of N numbers entered by the user.
Q21. Write a program to find the sum of all even numbers between 1 and N.
Q22. Write a program to find the smallest digit in a given number.
Q23. Write a program to find the largest digit in a given number.
Q24. Write a program to calculate the product of the digits of a number.
Q25. Write a program to print all divisors of a number.
Q26. Write a program to find the sum of all odd numbers between 1 and N.
Q27. Write a program to count the number of prime numbers between 1 and N.
Q28. Write a program to check if a given number is divisible by both 3 and 5.
Q29. Write a program to count how many numbers between 1 and N are divisible by 7.
Q30. Write a program to print the multiplication table for a given number N.
Bikki Singh
Hi, I am the instructor of TechnoVlogs. I have a strong love for programming and enjoy teaching through practical examples. I made this site to help people improve their coding skills by solving real-world problems. With years of experience, my goal is to make learning programming easy and fun for everyone. Let's learn and grow together!