Hi all,
An empty array declared in a called function is used as a pointer to hold the address of an object passed in the calling function. this is perfectly legal.
{/*calling function*/
...
my_function(&int_variable);
...
}
/*my function definition*/
my_function(int i[])
{
......
}
my question is why doesnt the compiler recognize it as an empty array declaration and throw an error?? I have always assumed that the arguments in the definition of any unction are nothing but the declarations of its local objects.
Please let me know if the question is not clear.
Thanks
Swapna