filmov
tv
Write a C program and define a function add() that add three indices of an array

Показать описание
15. Write a C program and define a function add() that accepts three integers. These integers indicate indices of an integer array. The function returns the summation of the elements stored in those indices.
7
8
8
0
9
For example, if we call the function add( 0, 2, 5), the function will return 24. The output is formed by 7+ 8+ 9 because elements at indices 0, 2 and 5 are 7, 8 and 9 respectively.
7
8
8
0
9
For example, if we call the function add( 0, 2, 5), the function will return 24. The output is formed by 7+ 8+ 9 because elements at indices 0, 2 and 5 are 7, 8 and 9 respectively.