I have an array and a for loop. I want the for loop to stop depending on the number of elements the array has.
For example if I have an int array []={1,0,1,0,1}
I want the loop to execute code 5 times. Similar to the function for strings .length() but for integers. An example with a simple code would be the best answer :)
like this pseudocode:
for(int b=0;b<array-length;b++)