Question: Store user input in array of structures (C programming)? Say I have an array of structures: struct info { char name[100]; int number; }; struct

Store user input in array of structures (C programming)?

Say I have an array of structures:

struct info {

char name[100];

int number;

};

struct info person[10];

I prompt the user to enter a name and number. How would I store the name and the number entered by the user into this array of structures (using scanf), particularly as a function? Also, how would I write this array of structures into a text file?

Q55;

the body mass index is used mainly to determine

a. your fat percentage

b. your overrall physical condition

c. how your body weight might affect your health

d. how height correlates with weigh

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 Programming Questions!