fork download
  1. struct studentInfo
  2. {
  3. int highestGrade;
  4. int highestGradeLocation;
  5. int lowestGrade;
  6. int lowestGradeLocation;
  7. int averageScore;
  8. };
  9. void Grades(studentInfo) {}
  10. int main()
  11. {
  12. // first create a variable
  13. studentInfo v1;
  14. // then access its members
  15. v1.highestGrade = 99;
  16.  
  17. // or you can set every member right away
  18. studentInfo v2 = {99, 10, 10, 4, 12};
  19.  
  20. Grades(v2); // calling a function
  21. }
  22.  
Success #stdin #stdout 0s 3292KB
stdin
Standard input is empty
stdout
Standard output is empty