You are on page 1of 19

HARDIK CHHABRA

Practical file submitted in partial fulfilment


for the evaluation of

“Programming in C-Lab”

Submitted By:
Student Name: Hardik Chhabra
Enrolment no: 00117702722
Branch & Section: CSE -A

Submitted To:
● Dr. Nivedita

1
HARDIK CHHABRA

Index
S.No Experiment Title (GGSIPU) Page No. Date Sign

1 A program to find factorial of a number

2 A program to find sum of a geometric


progression
3 A recursive program to find first ‘m’
Fibonacci numbers
4 A menu driven program to perform operations
on matrices/matrix
5 A program to do operations on strings

6 A program containing an array of records


containing the information of managers and
workers of a company. Print all the data of
workers and managers in separate files
7 Write a program to store records of a student
in student file. The data must be stored using
binary file. Program should be able to read
and append records in the student
file(student.txt).
8 Write a program to count the number of
lowercase, uppercase, numbers and special
characters present in the contents of text file.

2
HARDIK CHHABRA

Index
S.N Experiment Title Pag Date Sign
o (Beyond Curriculum) e
No.
1 A program to return largest
number out of two(flowchart)
2 A program to find sum of two
numbers(flowchart)
3 A program to print ‘Hello world”
(program and flowchart)
4 A program to find whether a
number is odd or even (program
and flowchart)
5 A program to print a pyramid of *

6 A program to print inverted


pyramid of *
7 10% discount is given, when a
customer buys more than 100
items. Number of items and cost
will be entered by the user. Write
an algorithm to calculate final cost.
(flowchart)
8 A program to understand continue
statement. Calculate sum of num,
if the user enters negative number,
it is not added.
9 A program to find sum and
average of numbers using array.
10 A program to find sum of n natural
numbers using recursion
11 A program to understand the
concepts of ‘call by value’ and
‘call by reference’ (swapping of
two numbers)
12 A program to print decimal
numbers in binary form
13 A program to store the information
of 5 students by using an array of
structures.

3
HARDIK CHHABRA

EXPERIMENT 1
Problem statement:

Algorithm (handwritten):

Flowchart and Pseudocode with output(optional):

Programming Code:

Output:

Learning Outcomes (handwritten):

4
HARDIK CHHABRA

Problem statement: A program containing an array of records containing


the information of managers and workers of a company. Print all the data of
workers and managers in separate files
Algorithm:

5
HARDIK CHHABRA

Programming code:

6
HARDIK CHHABRA

Output:

Learning outcome:

7
HARDIK CHHABRA

Problem statement: Write a program to store records of a student in student


file. The data must be stored using binary file. Program should be able to read
and append records in the student file(student.txt).
Algorithm:

8
HARDIK CHHABRA

Programming code:

9
HARDIK CHHABRA

Output:

Learning outcome:

10
HARDIK CHHABRA

Problem statement: Write a program to count the number of lowercase,


uppercase, numbers and special characters present in the contents of text file.
Algorithm:

11
HARDIK CHHABRA

Programming code:

Output:

12
HARDIK CHHABRA

Problem statement: A program to understand continue statement. Calculate


sum of num, if the user enters negative number, it is not added.
Algorithm:

Programming code:

13
HARDIK CHHABRA

Output:

Learning outcome:

14
HARDIK CHHABRA

Problem statement: A program to print decimal numbers in binary form.


Algorithm:

Programming code:

15
HARDIK CHHABRA

Output:

Learning outcome:

16
HARDIK CHHABRA

Problem statement: A program to store the information of 5 students by


using an array of structures.

Algorithm:

17
HARDIK CHHABRA

Programming code:

18
HARDIK CHHABRA

Output:

Learning outcome:

19

You might also like