Practical List 1

1. To print “Hello World”.

2. To read one number and display it.

3. To make simple calculator operation like addition, subtraction, multiplication, division etc.

4. To read four integer numbers from user and find sum, product and average of these four numbers

5. To find area of following.

i. Square (a=l*l, where a = area, l = length)

ii. Rectangle (a=l*b, where a = area, l = length, b=breadth)

iii. Circle (a=pi*r*r, where a = area, r = radius, pi=3.14)

iv. Triangle (a=h*b*0.5, where a = area, h = height, b = base)

6. To calculate simple interest (i = (p*r*n)/100 ) where i = Simple interest, p = Principal amount, r = Rate of interest, n = Number of years

7. To compute Fahrenheit from centigrade (f=1.8*c +32)

8. To compute Centigrade from Fahrenheit(c=5.0*(f-32)/9.0)

9. To find out distance travelled by the equation d = ut + at^2

10. To enter a distance in to kilometre and convert it in to meter, feet, inches and centimeter.

11. To prepare pay slip using following data.

Da = 10% of basic, Hra = 7.50% of basic, Ma = 300,

Pf = 12.50% of basic, Gross = basic + Da + Hra + Ma, Nt = Gross – Pf.


Practical List 2 (If Condition)

Marks       Grade

100 - 80     Distinction

79 - 60       First Class

59 - 40       Second Class

< 40           Fail


Practical List 3 (For Loop)

1. To print 1 to 10 numbers.

2. To print first N numbers.

3. To print Squares first N Numbers

4. To print Cubes of first N Numbers

5. To print first odd numbers from first N Numbers

6. To print first even numbers from first N Numbers

7. To print a multiplication table.

8. To print alphabet in upper & lower case.

9. To print all numbers between given two numbers x & y.

10. To print all character between x & y range.

11. To finds the summation of all integers numbers between from 1 to 10.

12. To finds the summation of N numbers entered by user.

13. To print factorial of N numbers.

14. To find Sum and Average of 1st N Numbers.

15. To count Total number of ODD numbers and EVEN numbers from N numbers.

16. To print all odd and even numbers between given two numbers x and y including x & y. also get their sum and average.

17. Evaluate the series 1^2+2^2+3^2+......+n^2

18. Evaluate the series 1+1/2+1/3+1/4+....+1/n.

19. Evaluate the series 1+1/2!+1/3!+1/4!+.....+1/n!.

20. Evaluate the series sum=1-x+x^2/2!-x^3/3!+x^4/4!......-x^9/9!

21. Use recursive calls to evaluate F(x) = x – x3 / 3! + x5 / 5 ! – x7 / 7! + ... xn/ n!.


Practical List 4 (Pattern)

Type 1

Type 2

Type 3

Type 4

Other



Practical List 12 (Structure)


1  Insert student basic details using structure and print the same.

2  Access student basic details using pointer of structure and print the same.

3  Insert five student basic details using array of structure and print the same.

4  Define structure data type called time_struct containing three member’s integer hour, integer minute and integer second.  Develop a program that would assign values to the individual number and display the time in the following format: 16: 40:51

5  Define a structure called cricket that will describe the following information: Player name, Team name, Batting average.  Using cricket, declare an array player with 50 elements and write a C program to read the information about all the 50 players and print team wise list containing names of players with their batting average


Practical List 13 (Dynamic Memory Allocation Function)


 Link all 3 objects with each other and display them using function.



Practical List 14 (File Management)


1. Read the file ABC and print it in console.

2 Create file ABC and insert record of student information entered by console.

3 Read file ABC and copy it to new file DEF.

4 Append the content in given file ABC.

5 Write a programs using fprintf(), fscanf() functions.

6 Write “A B C D ....Z” into file using putc() and display on console using getc() function.

7 Write a programs using rewind(), ftell(), fseek() functions.

8 Read first ‘n’ character and last ‘n’ characters of the file using appropriate file function.

9 A file named data contains series of integer numbers. Write a c program to read all numbers from file and then write all odd numbers into file named “odd” and write all even numbers into file named “even”. Display all the contents of these file on screen.