1Declare a student structure that contains Students first
1.Declare a student structure that contains :
- Student\'s first and last name
-Student ID
2. Create the following functions:
-getStudentInfo(void)
Declares a single student, uses printf()/scanf() to get input
Returns the single student back
- printStudentInfo(student_t *st_ptr)
Takes the pointer to a student (to avoid making a copy)
-Prints out all of the student information
3. Declare an array of five students
4. Using a for loop and getStudentInfo() function, get input of all the students
5. Using a for loop and printStudentInfo() function, print all the output of all students.
Solution
getStudentInfo(void)
{
printStudentInfo(student_t *st_ptr)
{
str_ptr.getStudentInfo();
display(stud);
return 0;
}
int main()
{
printStudentInfo(str_ptr);
}
return 0;
}
