0% found this document useful (0 votes)
11 views1 page

Explanation of Task 3

Uploaded by

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

Explanation of Task 3

Uploaded by

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

1.

Student Record

 We create a structure to store information about each student, including their ID, name, course,
and grade.

2. File Operations

 We use two types of files:

o Input file: To read student information from a file named "students.txt".

o Output file: To write new student information to the "students.txt" file.

3. Adding a Student

 The program asks the user to enter the student's details (ID, name, course, grade).

 It then writes this information to the file.

4. Displaying Students

 The program reads all the student information from the file.

 It then shows each student's details on the screen.

5. Searching for a Student

 The program asks the user to enter a student's ID.

 It searches the file for the student with that ID.

 If found, it displays the student's information.

 If not found, it shows a message.

6. Program Flow

 The program presents a menu with options to:

1. Add a new student

2. Display all students

3. Search for a student

4. Exit the program

You might also like