/* Passing an array as a parameter */ #include void cubes(int B[], int n) { int i ; for (i = 0 ; i <= n-1 ; i++) B[i] = i * i * i ; } main() { int A[10], i ; for ( i = 0 ; i <= 9 ; i++) A[i] = i*i ; printf("\n") ; for ( i = 0 ; i <= 9 ; i++) printf("A[%d] = %d\n", i, A[i]) ; cubes(A, 10) ; printf("\n") ; for ( i = 0 ; i <= 9 ; i++) printf("A[%d] = %d\n", i, A[i]) ; printf("\n") ; }