Question: Please answer the questions as soon as possible . I already done with question 1 . Thank you . Create two global structures named Details




Please answer the questions as soon as possible . I already done with question 1 . Thank you .
Create two global structures named Details and Patient. The first structure named Details contains the members: dateAdmit (use string), illnessType, status (e.g, high risk, medium risk, normal) while the structure Patient contains the members: ID, name, wardNo and the structure Details (nested struct). Write a program that does the following: a. Declare an array of structure of size 4 that can store the information of 4 patients. b. A function that passes the structure as an argument and accepts information about the patient through user input. c. A function that sorts the information about the patient in descending order based on name. d. A function that writes the information about the patient into a text file (*.txt). Sample output: Enter ID of patient 123456 Enter name of patient.: Muhd. Aliff Rusydi Enter ward no of patient. 25A Enter date of admission 060122 Enter type of illness. Stroke Enter status: High isk Enter ID of patient345678 Enter name of patient. Siti Roslinda Saad Enden ward no of patient: 44B Enden date of admission: 311221 Enter type of 1.11ness Covid-19 Enter status: Medium nisk Enter ID of patient 411290 Enden name of patient Abu Khuzair Ali Enter ward no of patient: 210 Enter date of admission: 030122 Enter type of illness Diabetes Enter status: Medium risk Enter ID of patient. 561035 Enter name of patient Fateema Al-Walid Enter ward no of patient: 53B Enten date of admission: 261221 Enter type of illness. Athma Enter status: Normal ID Patient Name Ward No Date Admit Illness Status ---- 345678 123456 561035 411290 Siti Roslinda Saad Muhd. Aliff Rusydi Fateema Al-Walid Abu Khuzair Ali 44B 25A 53B 210 311221 0 60122 261221 030122 Covid-19 Stroke Athma Diabetes Medium risk High risk Normal Medium risk #include
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
