I wrote a function containing array as argument, and call it by passing value of array as follows.
void arraytest(int a[]) { // changed the array a a
You are passing the address of the first element of the array