// simple example illustrating a structure type, structure variables, and // how to access the data inside the structures #include #include using namespace std; struct Student { char fName[20]; // first name char lName[20]; // last name int socSecNumber; // social security number double gpa; // grade point average }; int main() { Student s1 = {"John", "Smith", 123456789, 3.75}; Student s2 = {"Alice", "Jones", 123123123, 2.66}; cout << fixed << setprecision(2); cout << s1.fName << ' ' << s1.lName << ' ' << s1.socSecNumber << ", " << s1.gpa << '\n'; cout << s2.fName << ' ' << s2.lName << ' ' << s2.socSecNumber << ", " << s2.gpa << '\n'; return 0; }