I've got a problem. I have a function (It doesn't return any information) and array. I need to write information into array inside of function that is inside of another function.
It should be look like this example, but in javascript:
#include <stdio.h>
void setDefault(int * array);
void setDefault2(int * array2);
int main(void)
{
int a[]={0,1,2};
setDefault(a);
printf("%d\n",a[0]);
return 0;
}
void setDefault(int * array)
{
setDefault2(array);
}
void setDefault2(int * array2)
{
array2[0]=-1;
}
PS. Thanks for help