do you know if there is any predefined function to count all the element in an array? or we have to write such functions ourselves?
for instance: if i have an array like this below:
how can we find out if there are 6 elements in the array intMyArray ??
however, when I pass the array to a function like,
count = sizeof (intMyArray)/sizeof(int); // this work, it gives me correct value
int countArrayElement(int arr);
int countArrayElement(int arr)
int count = 0;
count = sizeof (arr)/sizeof(int); // wont work at all, arr is just the first element