0% found this document useful (0 votes)
14 views2 pages

Assignment 242 SAh SH

The assignment requires students to create a program for managing a student database with specific tasks including declaring a student structure, inputting data from a file, printing stored data and total marks, and calculating maximum and minimum CGPA. Students must implement functions for each task and output results to a file. The final submission must include the source code, input file, and output file in a zip format.

Uploaded by

pial20872
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

Assignment 242 SAh SH

The assignment requires students to create a program for managing a student database with specific tasks including declaring a student structure, inputting data from a file, printing stored data and total marks, and calculating maximum and minimum CGPA. Students must implement functions for each task and output results to a file. The final submission must include the source code, input file, and output file in a zip format.

Uploaded by

pial20872
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

United International University

Department of Computer Science and Engineering


CSE 1112 Structured Programming Language Laboratory
Summer 2024
Assignment

IMPORTANT: The following problem has five tasks with specific instructions. Please follow the instructions
exactly as given in the problem description.

You are trying to build and manage a student database for your class. Write a program to perform the
following tasks:

1. Declare a structure student with the following attributes:

 A string called name


 A string called id
 A 2-D float array called marks to hold four marks for three subjects as shown below:

Att. CT Mid Final


Subject1

Subject2

Subject3

 A float called cgpa

2. Take ten students’ information as input in an array struct student st[10]. Note that all inputs must be
taken from a file called “input.txt” using file operations. A sample is shown below:

Tamim
011221999
10 20 28 37
10 18 30 35
10 15 18 34
3.8
………………………
3. Print the stored data as output in file “output.txt”. Use the function void print(struct student st[]) to
print the data. A sample is shown below:

Student 1:
Name: Tamim
Id: 011221999
Subject 1 marks: 10 20 28 37
Subject 2 marks: 10 18 30 35
Subject 3 marks: 10 15 18 34
CGPA: 3.8

4. Print the total marks of each student for each subject in file “output.txt”. Use the function void
printtotal(struct student st[]) to perform this task. A sample is shown below:

Student 1: Subject 1 total: 95


Subject 2 total: 93
Subject 3 total: 77
…………………………..

5. Print the maximum and minimum CGPA of the class in file “output.txt”. Use the function
floatmaxCGPA(struct student st[]) and float minCGPA(stuct student st[]) to perform this task. A sample
is shown below:

Maximum CGPA: 3.8


Minimum CGPA: 3.2

IMPORTANT: You have to submit your source code, input file and output file. Make a zip file with all three and
upload using the link provided in LMS.

You might also like