In C, you can create an array of structs by first defining the struct and then declaring an array of that struct type. Here’s an example:
In this example, people
is an array of 3 Person
structs.
In C, you can create an array of structs by first defining the struct and then declaring an array of that struct type. Here’s an example:
In this example, people
is an array of 3 Person
structs.