ProAnswers.org

Why declare a struct that only contains an array in C?

Why declare a struct that only contains an array in C?

struct ABC
{
unsigned long array[MAX];

} abc;

When does it make sense to use a declaration like this?

It allows you to pass the array to a function by value, or get it returned by value from a function.

Structs can be passed by value, unlike arrays which decay to a pointer in these contexts.