Suppose I have function
foo(double * pa)
where pa is either populated from [0] to [100]
OR
pa is populated for [0] only.
My function does the following:
foo(double * pa)
{
IF (pa is an array of 100) THEN x[0 to 100] = pa[0 to 100]
ELSE x[0 to 100] = pa[0]
}
Q: How is foo() going to know whether pa[] is an array of 100?
In general, you have to TELL it. For example:
If you were coding in C++, however, you could use an STL container such as a vector: