Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

cant use goto or recursion or global variables along with scanf Write a program that read the id, names, and marks for a number of

image text in transcribed
cant use goto or recursion or global variables along with scanf
Write a program that read the id, names, and marks for a number of students from the user. The program then displays a list of all the students and the average marks. This assignment will help you understand C pointers, characters, and strings. NOTE: do NOT use scanf in this assignment. . The program will REQ-1: in main function, read the total number of students from the user. Valid number of students is 1 to 10 When the number is valid, create three arrays for storing the id, the name, and the marks. Then call the following two functions. REQ-2: In a function, read id, name, and marks for student from the user, store them into the three arrays defined in the main function. Do not use structure here. Each record is given in a line of text, with id, name, and marks separated by a comma. Student id is a positive integer, name is any string that contains letters and spaces and mark is a positive double value not greater than 10. Validate the id and the marks, and read the line again if there is any errors in the data. REQ-3: In another function, print the list of students and the average mark. Student names are displayed in all. caps. Average mark is formatted to 2 decimals. --- Enter number of students (1-10): 33 = Enter number of students (1-10): -2 --- Enter number of students (1-10): 4 --- Enter id, name, and mark separated by comma. Student #1: abc, Superman, 9.5 Student #1: 123, Superman, abc Student #1: O, Superman, 9.5 Student #1: 123, Superman, Student #1: 123, Superman, 12.3 Student #1: 123, Superman, 9.5 Student #2: 124, Spider Man, 8.7 Student #3: 125, Super Giri, 6.3 Student #4: 126, The Hulk, 9.2 # ID Name Mark 1 2 3 4 123 124 125 126 SUPERMAN SPIDER MAN SUPER GIRL THE HULK 9.50 8.70 6.30 9.20 8.43 AVERAGE

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Advances In Databases And Information Systems 23rd European Conference Adbis 2019 Bled Slovenia September 8 11 2019 Proceedings Lncs 11695

Authors: Tatjana Welzer ,Johann Eder ,Vili Podgorelec ,Aida Kamisalic Latific

1st Edition

3030287297, 978-3030287290

More Books

Students also viewed these Databases questions

Question

14-18 Compare the two major types of planning and control tools.

Answered: 1 week ago