0% found this document useful (0 votes)
1 views

C_Journal_Programming List

The document outlines a comprehensive list of practical programming assignments in C, categorized into five assignments focusing on basic programs, condition-based programs, loop-based programs, array-based programs, and string-based programs. Each assignment includes specific tasks such as printing outputs, performing arithmetic operations, calculating averages, and manipulating strings. The tasks range from simple outputs to more complex calculations involving conditions and loops.

Uploaded by

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

C_Journal_Programming List

The document outlines a comprehensive list of practical programming assignments in C, categorized into five assignments focusing on basic programs, condition-based programs, loop-based programs, array-based programs, and string-based programs. Each assignment includes specific tasks such as printing outputs, performing arithmetic operations, calculating averages, and manipulating strings. The tasks range from simple outputs to more complex calculations involving conditions and loops.

Uploaded by

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

US1MABCA02 || C Practical List

US01MABCA02|| C Practical Programs List


Assignment – 1 (Basic Programs)
1. J1 To print “Hello World”
2. To print address (using \n and \t).
3. To read two numbers and print it.
4. To find the addition of two integer numbers.
5. J2 To read, add, subtract, multiply, divide and modulo two integer numbers.
6. To find average of given three numbers.
7. J3 Write a program to read 5 integer numbers, calculate and print average of it.
8. To read a full name.(Use gets and scanf)
9. J4 To find simple interest.[(p*r*n)/100]
10. To find the area of triangle. [( b * h)/2]
11. To find out the area of rectangle.(l*b)
12. J5 To find area of circle. [3.14*r*r]
13. J6 To swap (interchange) two number using third variable.
14. J7 To print customer bill. Read customer number,name,number of unit purchased,
rate per unit and discount in percentage. Calculate bill amount,discount in
rupees,net bill amount and print all the information.
Assignement-2 (Condition Based Programs)
15. J8 To check which number is larger from two integer numbers.
16. J9 To check which number is smaller from two integer numbers.
17. J10 To check whether given number is odd or even.
18. J11 To check whether given number is positive, negative or zero.
19. To check whether given number is divisible by x or not.
20. J12 To read two operands and one arithmetic operator and perform the operation
according to it using switch statement.
21. J13 To read student roll number, name and marks of 3 subjects. Calculate total,
percentage class and result according to criteria.
If student fails in one or two subjects then declare result as ATKT and class as ****.
If student fails in more than two subjects then declare result as FAIL and class as
****.
If student passes all the subjects then declare result as PASS and find class
according to following criteria.
If percentage is >=70 then class is Distinction.
If percentage is >=60 then class is First Class.
If percentage is >=50 then class is Second Class.
If percentage is >=40 then class is Pass Class.
Print all the information in proper format
US1MABCA02 || C Practical List

22 J14 An electric power distribution company charges its domestic consumers as follows:
Consumption Units Rate of Charge
1-100 Rs. 0.75 per unit
101-300 Rs. 75 plus Rs. 1.00 per unit excess of 100
301-500 Rs. 275 plus Rs. 1.50 per unit excess of 300
500 and above Rs. 575 plus Rs. 1.75 per unit excess of 500
Read customer number, name and unit consumed. Calculate and print bill amount.
23 J15 To read employee code, employee name, Basic Salary and LIC.
Calculate DA, HRA, MA, PF, IT and PT according to following criteria.
DA calculation PF calculation
For basic<=5000 then da = 20% of For basic<=5000 then pf= 8% of basic.
basic. For basic<=9000 then pf=12% of basic.
For basic<=9000 then da = 30% of For basic<=15000 then pf=20% of basic.
basic. For 15000<basic then pf=25% of basic
For basic<=15000 then da = 40% of
basic.
For 15000<basic then da= 50% of basic
HRA calculation PT Calculation
code = 0 then hra=0 If Gross Salary <=10000 then PT=200 rs
code=1 then hra=120 rs. If Gross Salary <=20000 then PT=400 rs.
code=2 then hra=250 rs. If Gross Salary >20000 then PT = 500 rs.
code=3 then hra=400 rs.
MA CALCULATION IT Calculation
20% of basic salary 10% of Gross Salary.
Print the pay Slip as follows:
EMPLOYEE PAYSLIP
Employee Code: ___________ Name: ________________
Earnings Amount Deductions Amount
BASIC 99999.99 PF 99999.99
DA 99999.99 LIC 99999.99
HRA 99999.99 IT 99999.99
MA 99999.99 PT 99999.99
Gross Salary 99999.99 Total Deduction 99999.99
Net Salary 99999.99
Assignment – 3 (Loop Based Programs)
24. To print your name on the screen 10 times using while loop.
25. To print your name on the screen 10 times using do while loop.
26. To print your name on the screen 10 times using for loop.
27. J16 To print 1 to n numbers using for loop.
28. J17 To find out the factorial of a given number.
US1MABCA02 || C Practical List

29. To read an integer number and display each digit of it in a separate line in reverse
order.
30. J18 To read an integer number and display it in reverse order.
31. J19 To read any integer number and find out the total number of an odd value digits
and even value digits and also print the sum of all odd value digits and sum of
even value digits.
32. J20 To check whether the number is Palindrome.
33. To check whether the number is Armstrong.
34. To check whether the number is Prime.
35. To print the following series: 1, 2, 3, 4, … Up to N.
36. To print the following series: 1, 3, 5, 7, … Up to N.
37. To print the following series: 2, 4, 6, 8, … Up to N.
38. To print the following series: 1, 4, 9, 16, … Up to N.
39. J21 To print N terms of Fibonacci series.
Input: N=8
Output: Fibonacci series: 0 1 1 2 3 5 8 13
40. To print the following series and find the sum: 1 + 2 + 3 + 4 + 5 + …………up to N.
41. To print the following series and find the sum: 1 + 3 + 5 + 7 + 9 + …………up to N.
42. To print the following series and find the sum: 1 + 4 + 9 + 16 + 25 + ……up to N.
43. To print the following series and find the sum: 1 – 2 + 3 – 4 + 5 – 6 + ……up to N.
44. To print the following pattern for N=4.
*
* *
* * *
* * * *
45. J22 To print the following pattern for N=4.
1
2 2
3 3 3
4 4 4 4
US1MABCA02 || C Practical List

46. To print the following pattern for N=4.


1
1 2
1 2 3
1 2 3 4
47. To print the following pattern for N=4.
1
2 3
4 5 6
7 8 9 10
48. J23 To print the following pattern for N=4.
* * * *
* * *
* *
*
49. J24 To print the following pattern for N=4.
A
A B A
A B C B A
A B C D C B A
Assignment – 5 (Array bases Programs)
50. To read N numbers from user. Store them in array and print them.
51. J25 To read N numbers from user. Store them in array and print them in reverse order.
52. J26 To read N numbers from user. Store them in array and find the total number of
odd value element and even value element. Also find the sum of odd value
elements and even value elements.
53. J27 To read N numbers from user. Store them in array and find the maximum and
minimum element from the array and the difference between them.
US1MABCA02 || C Practical List

Assignment – 4 (String Based Programs)


54. To find out the length of a given string using string function.
55. J28 To Read two strings from user and compare them using string function.
Determine whether they are equal or string1 is greater or string2 is greater
according to first non-matching character.
56. J29 To count the total number of uppercase, lowercase, digit, blank space and special
character from the given string.
57. To find out number of occurrences of a given character in a string.
58. J30 To count total number of words in a given string.

You might also like