Chapter

Passing Arrays of Structures

From ComputerScienceOne by Dr Chris Bourke

Concepts

  1. How do you pass an array of structures to a function to compute an average GPA?

    "We often also have need to pass arrays of structures to functions. As an example, consider passing an entire roster of students to a function in order to compute the average GPA. If we have an array

  2. How do you pass an array of pointers to structures to a function?

    "Nevertheless, as we’ve previously seen it is sometimes preferable to maintain an array of pointers to structures. If we had an array of pointers, we would have a function that looks something like th

Passing Arrays of Structures | ComputerScienceOne | Bifalgorithm | Bifalgorithm