Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Task B. (Choose the path C:UsersPublic for storing the specified files) Write a C program that: Declares a structure named Student. The Student structure has

image text in transcribed

Task B. (Choose the path "C:\Users\Public" for storing the specified files) Write a C program that: Declares a structure named Student". The Student structure has the following fields: o Student number which is a string of 15 characters O Name Surname which is a string of 50 characters o Gender which is a character; 'M' means male and 'F' means female o Semester which is an integer number o CGPA which is a float number Declares an array of 5 Students. In the main function the program asks the user to enter the information of 5 students; a loop should be used. The entered indormation should be stored in the declared array. After that, the program should show the following message to the user: Do you want to see the information on the screen or to save the information into a file (S/F)? If the user enters 'S', all the information relating to students will be shown on the screen in form of a table. o If the user enters *F', all the information relating to students will be saved in form of a table into a file named "stdInfo.txt". If the user enters something else the program keeps asking the same question in a loop until a valid input is entered by the user. After doing either of the mentioned actions the program terminates. Example of output on the screen or in the file): Shin MPA Screen or in stdInfo.txt Std number Full Name Gender Semester CGPA mm 2017123456 2017123457 2016123458 2018123459 2018123450 John Miracle Mary Brown Emre Kankaya Abuhamed Nasser Apple Orange T 3 3 3 4 2 1 3.45 3.11 3.89 3.00 4.00

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

Database Processing

Authors: David J. Auer David M. Kroenke

13th Edition

B01366W6DS, 978-0133058352

More Books

Students also viewed these Databases questions