#include void aprint( int a[], int n) // print an integer array of any size (using size n) { for( int i = 0; i < n; ++i) printf( " %i", a[i]); putchar('\n'); } void add6( int a[], int n) // add 6 to each element of an integer array { for( int i = 0; i < n; ++i) a[i] += 6; } int main(void) { int x[10]={0,1,2}; // x[0], x[1], ..., x[9] aprint( x, 10); for( int i = 0; i<10; ++i) x[i] = i; aprint( x, 10); // print all 10 values of x aprint( x, 5); // print first 5 values of x add6( x, 4); // add 6 to first 4 elements of x aprint( x, 10); // print all 10 values of x aprint( x+3, 5); // print 5 values of x starting with offset 3 return 0; }