Question: Write a proper C program that makes use of a function that reads data from an input file (text.dat) and updates members of three structures.
| Write a proper C program that makes use of a function that reads data from an input file (text.dat) and updates members of three structures. The data file is opened and closed in the function. The structure should contain three members: LastName,Gender and Age. LastName will not exceed 30 characters. The array structure should be created in the main function. The function should be called to populate the array structure. The assigned values of the members should be displayed in the main function. The input and output should work for any number of records. However for testing purpose, make this work for an array of three structure variable. Populate the input text file with the following data. Gates Male 60 Jobs Male 55 Jane Female 45 |
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
