I came across this piece of code. I generally use \'&&\' or \'||\' to separate multiple conditions in a for
loop, but this code uses commas to do that.<
There is an operator in C called the comma operator. It executes each expression in order and returns the value of the last statement. It's also a sequence point, meaning each expression is guaranteed to execute in completely and in order before the next expression in the series executes, similar to &&
or ||
.