0
I would like to know how I discover the amount of positions that have a vector that has been passed by reference to the function, using the language C.
Example (Function prototype):
int Soma (int *vetorValores)
{
int i;
int tamVetor = ??
int total = 0;
for (i=0;i<tamVetor;i++)
{
total+=vetorValores[i];
}
return total;
}
Thank you, dear. I ended up coming to this conclusion also after numerous researches. Rs
– Ricardo Cassiano
The second way was exactly what I did. Thanks for the tip.
– Ricardo Cassiano
I’m glad I helped! Thanks for the feedback!
– Leonardo Teruel