/* * Code example for CP264 Data Structures II * String, pointers, and array of strings * HBF */ #include struct arraywrapper { int arr[10]; }; void test(struct arraywrapper x) { int i; for (i=0; i<10; i++) { x.arr[i] = i; } for (i=0; i<10; i++) { printf("%d ", x.arr[i]); } printf("\nsize %d", sizeof(x)); } void test1(struct arraywrapper *x) { int i; for (i=0; i<10; i++) { x->arr[i] = i; } for (i=0; i<10; i++) { printf("%d ", x->arr[i]); } } void test2(struct arraywrapper x[], int n) { int i, j; for (j=0; j