Lab Assignment -2 Date: 11 th & 14th Aug’2023
Subject – Data Structure Lab
Stream – CSE Semester – 3rd Batch – 2
Lab Experiment 1: Student Grade Calculation using Arrays
Aim: To understand and implement an array-based solution for calculating and analyzing student grades
in C programming.
Experiment Tasks:
I. Initialize an integer array grades with 10 student grades (e.g., 85, 92, 78, 95, 88, 72, 68, 90, 82,
77).
II. Calculate and print the average grade of the class.
III. Identify and print the highest and lowest grades in the array.
IV. Count and print the number of students who scored above the average.
Lab Experiment 2: Contact Management System using Arrays
Aim: To create a simple contact management system using arrays to store and manipulate contact
information.
Experiment Tasks:
I. Define a structure Contact with fields for name, phone, and email.
II. Create an array contacts of type Contact to store contact information for 5 individuals.
III. Implement a function to add a new contact to the contacts array.
IV. Implement a function to search for a contact by name and display their details.
V. Implement a function to display all contacts in the array.
Lab Experiment 3: Array Manipulation and Two-Dimensional Arrays
Aim: To explore advanced array manipulations and work with two-dimensional arrays using C
programming.
Experiment Tasks:
Task 1: Array Rotation
Rotate the elements of an integer array arr of size 6 by one position to the left.
Print the rotated array.
Task 2: Array Reversal
Reverse the elements of an integer array arr of size 7 in place.
Print the reversed array.
Task 3: Matrix Multiplication
Create two matrices A (2x3) and B (3x2) of integers.
Implement a function to multiply two matrices and store the result in matrix C (2x2).
Print the resulting matrix C.