E
erktek
Hi!
It is clear that when we try to pass a one dimentional array to a
function
we use int* such as
void display(int *LocalAarray)
{
......
}
int main(void)
{
int MainArray[3] = {1, 2, 3};
display(MainArray);
return 0;
}
name of the array is automaticly casted to (int*)
but what is the case I want to use two dimensional array ?
int main(void)
{
int MainArray[2][3] = {{1, 2, 3},
{4,5,6}};
display(MainArray);
return 0;
}
what should be the formal parameter of display function?
void display(int** Local Array) ? <-- Is it true?
It is clear that when we try to pass a one dimentional array to a
function
we use int* such as
void display(int *LocalAarray)
{
......
}
int main(void)
{
int MainArray[3] = {1, 2, 3};
display(MainArray);
return 0;
}
name of the array is automaticly casted to (int*)
but what is the case I want to use two dimensional array ?
int main(void)
{
int MainArray[2][3] = {{1, 2, 3},
{4,5,6}};
display(MainArray);
return 0;
}
what should be the formal parameter of display function?
void display(int** Local Array) ? <-- Is it true?