Question: 6. Explain how sum adds the values in the two-dimensional array emissions. int sum( int a[], int n); main() { int emissions [ 10
6. Explain how sum adds the values in the two-dimensional array emissions. int sum( int a[], int n); main() { int emissions [ 10 ][ 5 ], total; total=sum( (int* ) emissions, 50 ); } int sum( int a[ ], int n) int i, val = 0; for (i=0; i < n; i++ ) val +a[i]; return val;
Step by Step Solution
There are 3 Steps involved in it
In this code snippet we have a dimensional array called emissions with dimensions 10x5 The function ... View full answer
Get step-by-step solutions from verified subject matter experts
