Set-1 C Programs
Set-1 C Programs
7. Write a C program to generate numbers between 1 and 100 which are divisible by 2 and not
divisible by 3 and 5.
8. Write a C program to
a) Find the biggest of given three numbers.
b) Check whether the given year is leap year or not.
9. Write a C program to swap two numbers without using third variable using function
concept.
10. Write a C program to calculate and display total cost of 4 models of Pentium PC. Use the
single dimensional array for PC codes their price and quantity available.
11. Write a C program to input an array of numbers and sort the array using Bubble sort
a) Ascending order b) Descending order.
15. Write a C program to generate student mark sheets with subject details and the grades using
Structure.
16. Write a C program to create a structure called employee with name, employee id, name, age
designation and salary as data members. Accept five employee details and display it.
21. Write a program to display all ASCII numbers and their equivalent characters, numbers and
symbols using while loops. User should prompt every time to press ‘Y’ or ‘N’. if user press ‘Y’
display the next alphabet. Otherwise terminate the program. Test your program and report
the results obtained.
22. Write a C program to accept any single digit number and print it in words.Test your program
and report the results obtained.
23. Write a C program to simulate the calculator using Function. Test your program and report
the results obtained