How to calculate Number of Elements of an array using array address?

Viewed 32

So I got question in my mind! How am I suppose to calculate the Number of elements in an array when I have only its address Suppose I pass an array "A" as an actual parameter to a function and i stored its address in a pointer suppose "*b". Now how will I be able to calculate the length of array A(or number of elements in and array A) with its address(base address) only. Please tell me if I am thinking logically or it. If it is possible please tell me how If not please correct me Why! I can of course calculate length first and the pass both to other functions.

0 Answers
Related