0

when an array is received as a parameter by a function then whatever the dimensions of the array the first subscript is specified with empty braces i.e[ ] why is it so..... what is the implication of such a declaration

int sort(list[][a])
{
/*statements*/
}
3
Contributors
4
Replies
5
Views
11 Years
Discussion Span
Last Post by thekashyap
0

>what is the implication of such a declaration
You are passing a multidimentional array as a parameter. Look here for more information

However it shout be more like:
int sort( data type list[][a])
{
/*statements*/
}

0

by implication i meant how this empty braces is interpreted by the compiler because one of the dimension required by the compiler is missing......

0

>because one of the dimension required by the compiler is missing......

Is not missing. The compiler knows already about it.
Read the link that I pointed to you previously and you'll understand.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.