List of basic programming exercises
1. Write a C program to perform input/output of all basic data types.
2. Write a C program to enter two numbers and find their sum.
3. Write a C program to enter two numbers and perform all arithmetic operations.
4. Write a C program to enter length and breadth of a rectangle and find its perimeter.
5. Write a C program to enter length and breadth of a rectangle and find its area.
6. Write a C program to enter radius of a circle and find its diameter, circumference and
area.
7. Write a C program to enter length in centimeter and convert it into meter and kilometer.
8. Write a C program to enter temperature in Celsius and convert it into Fahrenheit.
9. Write a C program to enter temperature in Fahrenheit and convert to Celsius
10. Write a C program to convert days into years, weeks and days.
11. Write a C program to find power of any number x ^ y.
12. Write a C program to enter any number and calculate its square root.
13. Write a C program to enter two angles of a triangle and find the third angle.
14. Write a C program to enter base and height of a triangle and find its area.
15. Write a C program to calculate area of an equilateral triangle.
16. Write a C program to enter marks of five subjects and calculate total, average and
percentage.
17. Write a C program to enter P, T, R and calculate Simple Interest.
18. Write a C program to enter P, T, R and calculate Compound Interest.
List of bitwise operators exercises
Below is a set of programming exercises that can be used by a beginner or an intermediate
programmer to master their skills on bitwise operator.
1. Write a C program to check Least Significant Bit (LSB) of a number is set or not.
2. Write a C program to check Most Significant Bit (MSB) of a number is set or not.
3. Write a C program to get nth bit of a number.
4. Write a C program to set nth bit of a number.
5. Write a C program to clear nth bit of a number.
6. Write a C program to toggle nth bit of a number.
7. Write a C program to get highest set bit of a number.
8. Write a C program to get lowest set bit of a number.
9. Write a C program to count trailing zeros in a binary number.
10. Write a C program to count leading zeros in a binary number.
11. Write a C program to flip bits of a binary number using bitwise operator.
12. Write a C program to count total zeros and ones in a binary number.
13. Write a C program to rotate bits of a given number.
14. Write a C program to convert decimal to binary number system using bitwise operator.
15. Write a C program to swap two numbers using bitwise operator.
16. Write a C program to check whether a number is even or odd using bitwise operator.