I'm having some trouble understanding how to use a while loop to get the same results as this for loop:
for (int i=0; i<N; i++){
int datum[i] = 0;
}
Basically, to set all the elements in the array datum[N] to 0. Does the following code make sense in that regard, or am I missing something? thanks
int i = 0;
while (i < N){
datum[i] = 0;
i++;
}