This programming exercise is fully intended for the beginners who have just started to code. After completing this you would be familiar with the programming structures and semantics in C and will also increase your logical thinking ability. If you are not a beginner you can try some other exercises.
Required knowledge
Fundamentals of C, Data types, Taking user input in C
Here is a set of basic programming exercises to practice for beginners.
- Write a C program to enter two numbers and find their sum.
- Write a C program to enter two numbers and perform all arithmetic operations.
- Write a C program to enter length and breadth of a rectangle and find its perimeter.
- Write a C program to enter length and breadth of a rectangle and find its area.
- Write a C program to enter radius of a circle and find its diameter, circumference and area.
- Write a C program to enter length in centimeter and convert it into meter and kilometer.
- Write a C program to enter temperature in °Celsius and convert it into °Fahrenheit.
- Write a C program to enter temperature in Fahrenheit(°F) and convert it into Celsius(°C)
- Write a C program to convert days into years, weeks and days.
- Write a C program to find power of any number x ^ y.
- Write a C program to enter any number and calculate its square root.
- Write a C program to enter two angles of a triangle and find the third angle.
- Write a C program to enter base and height of a triangle and find its area.
- Write a C program to calculate area of an equilateral triangle.
- Write a C program to enter marks of five subjects and calculate total, average and percentage.
- Write a C program to enter P, T, R and calculate Simple Interest.
- Write a C program to enter P, T, R and calculate Compound Interest.
Recommended posts
- Bitwise operator programming exercises and solutions in C.
- If else programming exercises and solutions in C.
- Switch case programming exercise and solutions in C.
- Conditional operators programming exercises and solutions in C.
- Loop programming exercises and solutions in C.
- Array programming exercises and solutions in C.
- String programming exercises and solutions in C.
- Function and recursion programming exercises and solutions in C.