The Comma Operator
The for statements in Java and C++ use the same syntax and achieve a similar result but use different mechanisms.
int i, j; for (i = 0, j = 1; x[i] != 0; i++) if (x[i] == x[j]) j++;
Previous slide
Next slide
Back to first slide
View graphic version