C review questions
1. Write a C Program to print all numbers between 1 to n divisible by 7
2. Write a C Program to find sum of 2 + 4 + 6 + ….. + n
3. Write a C Program to find sum of 7 + 14 + 21 + ….. + n
4. Write a program to count backwards, from 20 to 1 and display “MUST” each time.
5. Write a program that displays even numbers between 10 and 50
6. Write a Program to display first 10 natural numbers and their sum.
7. Write a program that requests an integer value from the user. If the value is between 1 and 100 inclusive, print
“OK;” otherwise, print “Out of range”.
8. Write a program which continually asks the user to enter integers until 45 is entered.
9. Write a program to find the sum of a series: 1+2+3+4+……………..+n, after a user has entered the value of n.
10. Write a program that prints numbers between 30 and 100 which are divisible by 3.
11. Program to write Fibonacci sequence up to 100.
12. Program to find factorial of a number.
13. Program to find sum of the series 1+3+5+………….. n
14. Program to print multiplication table from 1*1 to 12*12
15. Write a c program to print Pascal triangle.
16. Write a program that repeatedly collects positive integers from the user, stopping when the user enters a
negative number or zero. After that, output the average of all positive entries.
17. Write a C Program to print 25 terms of 1 , 2 , 4, 7, 11, 16, …..
18. Write a program in C to print the numbers from 4 to 9 and their squares.
19. Write a C program that accepts a positive integer from the keyboard. If the input is invalid, it stops with
appropriate message. For a valid input, it determines the first and last digits of the number. Further, it checks
whether the first digit or the last digit is multiple of the other with appropriate message.
20. Write a program which accepts an integer n and checks whether the input number n is
in the range from -10 to 10. If the integer is not in the given range, then it asks the user
to enter the integer again. It then calculates the sum of integers from n to n3 and prints
out the result.
21. Write a program to print sum of all odd numbers from 1 to 50.
22. Write a program that does the following accepts a sequence of integers from the user, continuing as long as
the user enters even integer. Once an odd integer is entered, the program stops accepting input.
23. Write a program that does the following the program must compute the total number of even integers entered
and the average of them, and print those out.
24. Write a C Program to print square of all numbers 1 to 20 and print sum squares
25. Write a C program to find and print the square of each one of the even values from 1 to a specified value.
26. Write a C program to calculate the sum of all number not divisible by 17 between two given integer numbers.
27. Write a C program to find all numbers which are dividing by 7 and the remainder is equal to 2 or 3 between
two given integer numbers.
28. Write a C program that reads an integer and find all its divisors.
29. Write a program in C to display the cube of the number up to a given integer.
30. Write a program in C to display the n terms of odd natural number and their sum .
31. Write a program in C to display the n terms of even natural number and their sum.
32. Write a program in C to display the n terms of square natural number and their sum.
33. Write a program in C to find the number and sum of all integers between 100 and 200 which are divisible by
9.
34. Write a C programming to calculate and print the average of some integers. Accept all the values preceding
888.