struct studentInfo
{
int highestGrade;
int highestGradeLocation;
int lowestGrade;
int lowestGradeLocation;
int averageScore;
};
void Grades(studentInfo) {}
int main()
{
// first create a variable
studentInfo v1;
// then access its members
v1.highestGrade = 99;
// or you can set every member right away
studentInfo v2 = {99, 10, 10, 4, 12};
Grades(v2); // calling a function
}
c3RydWN0IHN0dWRlbnRJbmZvCiAgICB7CiAgICAgICAgaW50IGhpZ2hlc3RHcmFkZTsKICAgICAgICBpbnQgaGlnaGVzdEdyYWRlTG9jYXRpb247CiAgICAgICAgaW50IGxvd2VzdEdyYWRlOwogICAgICAgIGludCBsb3dlc3RHcmFkZUxvY2F0aW9uOwogICAgICAgIGludCBhdmVyYWdlU2NvcmU7CiAgICB9Owp2b2lkIEdyYWRlcyhzdHVkZW50SW5mbykge30KaW50IG1haW4oKQp7CiAgICAvLyBmaXJzdCBjcmVhdGUgYSB2YXJpYWJsZQogICAgc3R1ZGVudEluZm8gdjE7CiAgICAvLyB0aGVuIGFjY2VzcyBpdHMgbWVtYmVycwogICAgdjEuaGlnaGVzdEdyYWRlID0gOTk7CgogICAgLy8gb3IgeW91IGNhbiBzZXQgZXZlcnkgbWVtYmVyIHJpZ2h0IGF3YXkKICAgIHN0dWRlbnRJbmZvIHYyID0gezk5LCAxMCwgMTAsIDQsIDEyfTsKCiAgICBHcmFkZXModjIpOyAvLyBjYWxsaW5nIGEgZnVuY3Rpb24KfQo=