1.

Can The Sizeof Operator Be Used To Tell The Size Of An Array Passed To A Function?

Answer»

No. There’s no way to tell, at runtime, how many ELEMENTS are in an ARRAY PARAMETER just by looking at the array parameter itself. Remember, PASSING an array to a function is exactly the same as passing a pointer to the FIRST element.

No. There’s no way to tell, at runtime, how many elements are in an array parameter just by looking at the array parameter itself. Remember, passing an array to a function is exactly the same as passing a pointer to the first element.



Discussion

No Comment Found