I have an array like the following
int arr[32];
This array can contain 32 element.
If I added into that array some data like the following
arr[0] = 5;
arr[1] = 10;
arr[2] = 15;
arr[3] = 20;
As you see I added data into elements 0,1,2,3
and the other elements is still not initialized or empty.
Now, how to get the elements count that has only data ?
in current example will get 4 elements.
See Question&Answers more detail:os