4. Task 3: Reading and Writing a File Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid. Passing grade is 70-100. Failing grade is 0-69. Other value will be considered invalid. Store all the passing grade to an output file named passed.txt. Store all the failing grades to an output file named failed.txt. And store all the invalid grades to another output file named invalid.txt. The program must comply with the given sample output below: NOTE: Filename to read: grades.txt Filename to write: passed.txt, failed.txt, invalid.txt NOTE: Your source code must display any of the given sample output below. It means your source code should be flexible enough to meet any of the given sample output. Your source code output must be identical to any of the given sample output. It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output. Strictly follow the naming of file. Sample OUTPUT1: Enter File Name: grades.txt All grades are evaluated and stored in their respective files. DISPLAY FILE MENU [1] Passing [2] Failing [3] Invalid Option: 1 Passing Grades: 100, 90, 70, 99, Sample OUTPUT2: Enter File Name: grades.txt All grades are evaluated and stored in their respective files. DISPLAY FILE MENU [1] Passing [2] Failing [3] Invalid Option: 2 Failing Grades: 50, 0, 69, 1, Sample OUTPUT3: Enter File Name: grades.txt All grades are evaluated and stored in their respective files. DISPLAY FILE MENU [1] Passing [2] Failing [3] Invalid Option: 3 Invalid Grades: 101, -1, Sample OUTPUT4: Enter File Name: grades.txt All grades are evaluated and stored in their respective files. DISPLAY FILE MENU [1] Passing [2] Failing [3] Invalid Option: 4 Invalid Option Sample OUTPUT5: Enter File Name: grade.txt The file can’t be open. File does not exists.

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

4. Task 3: Reading and Writing a File

Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid. Passing grade is 70-100. Failing grade is 0-69. Other value will be considered invalid. Store all the passing grade to an output file named passed.txt. Store all the failing grades to an output file named failed.txt. And store all the invalid grades to another output file named invalid.txt. The program must comply with the given sample output below:

NOTE:
Filename to read: grades.txt
Filename to write: passed.txt, failed.txt, invalid.txt
NOTE:
Your source code must display any of the given sample output below.
It means your source code should be flexible enough to meet any of the given sample output.
Your source code output must be identical to any of the given sample output.
It means you have to strictly follow what are the displayed text, labels, casing of characters in the sample output.
Strictly follow the naming of file.
Sample OUTPUT1:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 1
Passing Grades: 100, 90, 70, 99,
Sample OUTPUT2:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 2
Failing Grades: 50, 0, 69, 1,
Sample OUTPUT3:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 3
Invalid Grades: 101, -1,
Sample OUTPUT4:
Enter File Name: grades.txt
All grades are evaluated and stored in their respective files.
DISPLAY FILE MENU
[1] Passing
[2] Failing
[3] Invalid
Option: 4
Invalid Option
Sample OUTPUT5:
Enter File Name: grade.txt
The file can’t be open. File does not exists.
Codio
Project
File
Edit
Find
Tools
Education
Help
> Project Index (static)
O Debug Current File
View
A Compile & Run
GMENDOZA83
task3.c
4. Task 3: Re..
+
1
Your code goes here...
Collapse
4. Task 3: Reading and Writing a File
Write a C program that will get 10 grades of the
student from a file named grades.txt. The
program will check each grade if its passing,
failing or invalid. Passing grade is 70-100. Failing
grade is 0-69. Other value will be considered
invalid. Store all the passing grade to an output
file named passed.txt. Store all the failing grades
to an output file named failed.txt. And store all
the invalid grades to another output file named
invalid.txt. The program must comply with the
given sample output below:
NOTE:
Filename to read: grades.txt
Filename to write: passed.txt, failed.txt, invalid.txt
NOTE:
Your source code must display any of the given sample output below.
It means your source code should be flexible enough to meet any of the given sample
output.
Your source code output must be identical to any of the given sample output.
100% (1:0)
Transcribed Image Text:Codio Project File Edit Find Tools Education Help > Project Index (static) O Debug Current File View A Compile & Run GMENDOZA83 task3.c 4. Task 3: Re.. + 1 Your code goes here... Collapse 4. Task 3: Reading and Writing a File Write a C program that will get 10 grades of the student from a file named grades.txt. The program will check each grade if its passing, failing or invalid. Passing grade is 70-100. Failing grade is 0-69. Other value will be considered invalid. Store all the passing grade to an output file named passed.txt. Store all the failing grades to an output file named failed.txt. And store all the invalid grades to another output file named invalid.txt. The program must comply with the given sample output below: NOTE: Filename to read: grades.txt Filename to write: passed.txt, failed.txt, invalid.txt NOTE: Your source code must display any of the given sample output below. It means your source code should be flexible enough to meet any of the given sample output. Your source code output must be identical to any of the given sample output. 100% (1:0)
Expert Solution
steps

Step by step

Solved in 2 steps with 1 images

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY