Question
program is in C do not use scanf , goto, global variables or recursion a program that reads ID, names, and marks for a number
program is in C
do not use scanf , goto, global variables or recursion
a program that reads ID, names, and marks for a number of students from user. Then displays a list of all students and average marks.
(should help in understand C pointers, characters, and strings)
REQ -1 in the main function, rad total numbers of students from user. Valid number of students is between 1-10. When the number valid, create three arrays for storing the id, name, and marks. Call following two functions:
req 2 in a function, read id, name and marks for each student from suer and store into three arrays defined in main function. Do not use structure. each record is given in the line of text with id, name, and mark separated by a comma. Student ID is a positive int, the name is any string that contains letters and spaces, and the mark is a positive double value not greater than 10. Validate id and marks and rad line again if any errors in data
req 3 in another function print lists of students and average mark. student names displayed in all-caps. The average mark is displayed with 2 decimals.
Example Output:
===Enter number of students (1-10) : 33
===Enter number of students (1-10) : 2
==Enter id, name, and mark separated with comma
Student #1 : eyr,John,9.5
Student #1 : 564,John,try
Student #1 : 0,John,9.5
Student #1 : 564,John,19.5
Student #1 : 564,John,0
Student #1 : 564,John,9.5
Student #2: 432, Amy, 8.7
------------------------------------------------------------
# ID NAME MARK
---------------------------------------------------------------
1 564 John 9.5
2 432 Amy 8.7
--------------------------------------------------------
Average 9.1
----------------------------------------------------------
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started