Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
0% found this document useful (0 votes)
10 views

Program for Files

Uploaded by

growthgear93
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views

Program for Files

Uploaded by

growthgear93
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 3

Practical File Programs

1. Write a program to find out addition of two numbers.


2. Write a program to find out addition of two numbers (user defined).
3. Write a program to find out average of five numbers (user defined).
4. Write a program to find percentage of marks of 5 subjects are given .(User defined).
5. Write a program to swap the values of 2 variables and print the values after swapping
with the help of 3rd variable.
6. Write a program to find out simple interest (user defined).
7. Write a program to convert any Celsius temperature into Fahrenheit (user defined).
8. Write a programme to swap the values of 2 variables without using 3rd variable (user
defined).
9. Write a program to find out whether a person is eligible for voting or not (user defined).
10. Write a program to find out whether a number is odd or even (user defined).
11. Write a program to find out whether a given year is leap year or not (user defined).
12. Write a program to print division of any student according to given percentage-
(i)between 40% to 50% is equal to 3rd division .
(ii)between 50% to 60% second division. (iii)between 60% to 75% First Division.
(iv)between 75% 100% First Division with honours.
(v)if any of these condition doesn’t meet then print fail.
14.Write a program to find out electricity bill according to the number of units
consumed-
(i) If no. of units consumed are less than or equal to 100. Then total amount of bill will
be ₹500.
. (ii)If no. of units consumed is between 101 to 300 then after hundred units ₹5 per unit
will be charged.
(iii)If no. of units consumed are between 301 to 500 then after 300 units ₹6 per units will
be charged.
(iv)If no. of units consumed are greater than 500 then after 500 ₹7 per unit will be
charged.
15.Write a program to calculate gross salary by the formula.
Gross salary=salary+incentive.
Take salary from user calculate the incentives according to the following condition.
(i)If salary between 20,000-30,000 then incentive will be 5% of salary.
(ii)If salary between 30,000-50,000 then incentives will be 10% of salary.
(iii)If salary between 50,000-70,000 then incentive will be 15% of salary.
(iv)If salary is greater than 70,000 then incentive will be 20% of salary.
16. Write a programme to find out whether the number is even or odd by using switch
statement.
17. Write a program to print number from one to 20 using for loop.
18. Write to print even number from 1 to 20 using for loop.
19. Write a programme to print odd numbers from 1 to 50 using for loop.
20. Write a program to print factorial of any given number using for loop.
21. Write a program to print the table of any given number using for loop.
22. Write a programme to find out table from 5 to 12 using nested for loop.
23. Write a program to find whether a given number is Armstrong or not using both for
loop and while loop.
24. Write a program to find out some of digits of any number using both for and while loop
.
25. Write a program to find out mn using both for loop and while loop.
26. Write a program to find out reverse of any given number using both for loop and while
loop.
27. Write a program to find out whether a given number is palindrome number or not
using both fault and while loop.
28. Write a program to check whether the given number is Armstrong number or not using
do-while.
29. Write a program to find out factorials of number from 2 to 9 using nested for loop.
30. Write a program to take an array of 10 elements and then bring these elements.
31. Write a program to find out the sum of array elements of size 10.
32. Write a program for 2-dimensional array in C.
33. Write a program to perform linear search.
34. Write a program to perform binary search.
35. Write a program to perform selection sorting.
36. Write a program to perform bubble sorting.
37. Write a program to perform insertion sorting.
38. Write a program to perform merge sorting.
39. Write a program to perform quick sorting.
40. Write a program to make a structure in C.
41. Write a program to make array of structures in C.
42. Write a program to make nested structure in C using separate structure and embedded
structure.
43. Write a program to perform passing structure to function.
44.Write a Program to Add or Concatenate Two Strings
45.Write a Program to Add 2 Binary Strings
46.Write a Program to Find the Length of a String
47.Write a Program to Store Information of Students Using Structure
48.Write a Program to Swap Two Numbers Using Pointers.

You might also like