Answer the question
In order to leave comments, you need to log in
Why in C 0 != 0 and 0 == 0?
Hello!
There is a problem with the C code:
SIZE_J = 600;
for (int j = 0; j < SIZE_J; j++) {
height[j] = TMP_data_0[j];
if (height[j] == 0) {
*size = j + 1;
break;
}
printf("j = %d\ncurrent = %f\n", j, height[j]);
}
printf("size = %d\n", size);
j = 559
current = 826.784363
j = 560
current = 827.878113
j = 561
current = 0.000000
j = 562
current = 0.000000
...
j = 587
current = 0.000000
j = 588
current = 0.000000
size = 590
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question