Passing Arrays To Function
Passing Arrays To Function
Function
Arrays NOTE
Initializing an array with more values
than the size of the array would lead to
a run-time (not compiler!) error
Referring to an array index larger than
the size of the array would lead to a
run-time (not compiler!) error
#include <iostream.h>
int sum(int data[], int n);
//PROTOTYPE
[]
Thats a wrap !
What we learned today:
What are arrays
Array indexing
Array initialization
Array index out of bound error
Passing arrays to functions
10