Passing an undeclared array to a function

Write your function to use int pointer then set that pointer to your array.

You don't -have- to use a declared array if for example you just want to read memory but it would be a bad idea to write just anywhere, and kind of dumb to expect meaningful data where it has not been placed.

pseudocode -- not checked, just to convey idea:

int myarray[ 10 ] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
int otherarray[ 20 ]; 

int *data; // can point to int or int array

void myfunction( int *d )
{
  // blah blah blah
}

void setup()
{
  // blah blah blah
}

void loop()
{
  // blah blah blah

  myfunction( myarray );
  myfunction( otherarray );

  // blah blah blah
}