Q:

Assign 1 value of a 3D array to a 1D array

I have a 3D array arr1[16][8][9] and I want to assign the contents of this array to a 1D array arr2[36].  So I'm trying:
arr2[0] = arr1[0][0][0];
arr2[1] = arr1[0][0][1];
......
arr2[8] = arr1[0][0][8];

I'm calling a function:
func_arr(int arr2[36], int arr1[16][8][9])

The function declaration goes like:
void func_arr(int arr2[36],int arr1[][8][9]);

But the array assignment seems to be invalid.  What is a better approach to do it? 

A:

Function calling seems incorrect.  Replace below line
func_arr(int arr2[36], int arr1[16][8][9])

with
func_arr(arr2, arr1);

Type of your first function argument is int [36] and you are passing arr2[36].  Assuming arr2 is int arr2[36], type of arr2[36] is int and thus a type mis-match.  Moreover arr2[36] is int located at address after the arr2 ends.