Yet again, I'm stumped. The teacher is very "hands off" and by that I mean she won't answer any sort of coding questions, you have to find the answer on your own. Some classmates and I are stumped by this one-
I have an struct which is an array Student a[3].
The first part of the assignment was to prompt the user for input,
a.name a.address etc.
The second part was to output the results. Easy enough.
Now I have to do this using a subfunction, first the output, then the input.
Here are the requirements-
Write the subprogram to share individual elements of the array -- not the whole array. You can use a loop in main to call the subprogram once for each element of the array.
DOs and DON'Ts: Do not write just one function that prints the data for all three student records via a single call to the function. Do not write three separate functions, one for each student record. Do not write a value-returning function -- do write a void function. Do write one generic function that can be used to print the data any student record, and call it once for each record. Do call that one function in main once for each student record.
Classmates and I are pretty stumped, just looking for some general direction here... thx in advance and thx for all the previous help.
I have an struct which is an array Student a[3].
The first part of the assignment was to prompt the user for input,
a.name a.address etc.
The second part was to output the results. Easy enough.
Now I have to do this using a subfunction, first the output, then the input.
Here are the requirements-
Write the subprogram to share individual elements of the array -- not the whole array. You can use a loop in main to call the subprogram once for each element of the array.
DOs and DON'Ts: Do not write just one function that prints the data for all three student records via a single call to the function. Do not write three separate functions, one for each student record. Do not write a value-returning function -- do write a void function. Do write one generic function that can be used to print the data any student record, and call it once for each record. Do call that one function in main once for each student record.
Classmates and I are pretty stumped, just looking for some general direction here... thx in advance and thx for all the previous help.