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
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started