Tuesday 26 March 2013

Is there any difference between the two declarations,


    Is there any difference between the two declarations,
1. int foo(int *arr[]) and
2. int foo(int *arr[2])
Answer:
No
Explanation:
Functions can only pass pointers and not arrays. The numbers that are allowed inside the [] is just for more readability. So there is no difference between the two declarations.


Blog Author: Vijay Kumar

No comments:

Post a Comment