#include <stdio.h>
typedef struct {
int data[256];
} Big;
long sum(const Big *b) {
long total = 0;
for (size_t i = 0; i < 256; i++) {
total += b->data[i];
}
return total;
}
int main(void) {
Big b = {0};
b.data[0] = 42;
printf("%ld\n", sum(&b));
return 0;
}pass a const pointer to avoid the copy