24ESPL101 LTPC
SDG NO. 4 & 9 3 0 03
PROGRAMMING IN C LAB
OBJECTIVES:
To develop programs in C using basic Programming Constructs
To develop applications in C using Arrays and Strings
To design and implement applications in C using Functions,
Structures
To develop applications in C using Files
LIST OF EXPERIMENTS
1. Write a program using I/O statements and expressions.
2. Write programs using decision-making constructs.
3. Write a program to find whether the given year is leap year or
not? (Hint: not every century on year is a leap. For example
1700, 1800 and 1900 is not a leap year)
4. Write a program to perform the Calculator operations, namely,
addition, subtraction, multiplication, division and square of a
number.
5. Write a program to check whether a given number is
Armstrong number or not?
6. Write a program to check whether a given number is odd or
even?
7. Write a program to find the factorial of a given number.
8. Write a program to find out the average of 4 integers.
9. Write a program to print half pyramid of *
10. Write a program to display array elements using two
dimensional arrays.
11. Write a program to perform swapping using function.
12. Write a program to display all prime numbers between two
intervals using functions.
13. Write a program to solve towers of Hanoi using recursion.
1
14. Write a program to get the largest element of an array using the
function.
15. Write a program to concatenate two strings.
16. Write a program to find the length of String.
17. Write a program to find the frequency of a character in a string.
18. Write a program to store Student Information in Structure and
Display it.
19. The annual examination is conducted for 10 students for five
subjects. Write a program to read the data and determine the
following:
(a) Total marks obtained by each student.
(b) The highest marks in each subject and the marks of the
student who secured it.
(c) The student who obtained the highest total marks.
20. Write a program to demonstrate file operations (e.g. count the
number of characters, words and lines in a file, replace a
specific word with the given word in the same file).
TOTAL: 45 PERIODS
LIST OF EQUIPMENT FOR A BATCH OF 30 STUDENTS:
Stand alone desktops with C compiler 30 Nos. (Or)
Server with C compiler supporting 30 terminals or more.
OUTCOMES:
Upon completion of the course, the student should be able to
1. Solve some simple problems leading to specific applications.
(D2)
2. Demonstrate C programming development environment,
compiling, debugging, linking and executing a program.(D2)
3. Illustrate C programs for simple applications making use of
basic constructs, arrays and strings.(D2)
4. Construct C programs involving functions and recursion. (D3)
5. Demonstrate C programs involving pointers, and structures. (D3)
6. Interpret applications using sequential and random access file.
(D3)
2
CO- PO, PSO MAPPING:
P PO PO3 PO4 PO5 PO PO7 PO8 PO PO1 PO1 PO1 PSO PSO
O 2 6 9 0 1 2 1 2
1
CO1 3 3 3 3 2 1 1 - 2 2 - 3 2 3
CO2 3 3 3 3 2 - 1 1 2 2 3 3 2 3
CO3 3 3 3 3 2 1 1 1 2 - 3 - 3 2
CO4 3 3 3 3 2 1 - 1 2 2 3 3 1 2
CO5 3 3 3 3 2 1 1 1 2 2 3 3 2 1
CO6 3 3 3 3 2 1 1 1 2 2 3 3 3 2