Question: a. Create a function call it sampleINFO that generates sets of random data for the struct below. Note: the struct INFO is handed the address

 a. Create a function call it sampleINFO that generates sets of

a. Create a function call it sampleINFO that generates sets of random data for the struct below. Note: the struct INFO is handed the address of a block of memory (use pointer). The memory is then filled with the new data (strcpy) b. Create a function call it DisplayINFO that uses fprintf to display the struct to FILE *outFile. Pass the structure to your function as an argument either by address or by value. struct INFO { char firstName[10] char lastName[10]; char sex int age; char position[25] int recordNo; }; char names[][10]={ "George", "Ann","Renata","Betty", "Sam", "Vince", "Stephane", "Ringo", "Helen", "Elmer", "Steve", "Aaron", "Kim", "George", "Paul", "John","Jean Luc", "Colm" }; char lastNames[][10]= {"Smith", "Kline", "Chin", "Arnold", "Saxby","Jones", "Stivic", "Michaud", "Crompton", "Ogilvy", "Singh", "Picard", "Ngo"); char role[][25]={"Captain", "Ensign", "Red Shirt", "Red Shirt", "Red Shirt", "Crew", "Medical Officer", "Science Officer","Crew","Crew", "Transporter Chief", "Morale Officer","Crew", "Crew", "Navigator", "Engineer"}; For the toolbar, press ALT+F10 (PC) or ALT+FN+F10 (Mac) B I U Paragraph Arial 14px TX 4G Q X2 X2 O WORDS POWERED BY TIN

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!