# Practice programs for C language

## Questionnaire for C programming

### Programs based on If-Else

1. C program to find the greatest number among three numbers.
2. C program to find out whether a given year is a leap year or not.
3. C program to convert temperature from Fahrenheit to Celsius and Celsius to Fahrenheit.
4. C program to check sign of a given number.
5. C program to check whether triangle is equilateral, scalene or isosceles.
6. C program to check whether the triangle is valid or not if sides are given.
7. C program to enter student marks and find percentage and grade. A college has the following rules for grading system:1. Below 25 – F
2. 25 to 45 – E
3. 45 to 50 – D
4. 50 to 60 – C
5. 60 to 80 – B
6. Above 80 – Ask the user to enter mark of 5 subjects and print the corresponding grade.
8. Write a C program to input basic salary of an employee and calculate gross salary according to given conditions.
Basic Salary <= 10000 : HRA = 20%, DA = 80%
Basic Salary is between 10001 to 20000 : HRA = 25%, DA = 90%
Basic Salary >= 20001 : HRA = 30%, DA = 95%

### Programs based on Structures

1. Program to Store Information of a Student Using Structure.
2. Program to Add Two Distances (in inch-feet system) using Structures.
3. Program to Add Two Complex Numbers by Passing Structure to a Function.
4. Program to Calculate Difference Between Two Time Periods.
5. Program to Store Information of Students Using Structure.
6. Program to Store Data in Structures Dynamically.

#### Click on the links attached with the topics to see the solutions.

Sharing is Caring!!