// example illustrating the passing of a structure into a function #include struct student { char fName[20]; // first name char lName[20]; // last name int socSecNumber; // social security number double gpa; // grade point average }; void PrintStudent(struct student s); // struct passed as parameter int main() { struct student s1 = {"John", "Smith", 123456789, 3.75}; struct student s2 = {"Alice", "Jones", 123123123, 2.66}; struct student s3 = {"Marvin", "Dipwart", 999999333, 1.49}; PrintStudent(s1); PrintStudent(s2); PrintStudent(s3); return 0; } void PrintStudent(struct student s) // prints the internal data of any student structure passed in { printf("%-20s %-20s %10d GPA: %4.2f\n", s.fName, s.lName, s.socSecNumber, s.gpa); }