continue
will cause the remaining portion of the enclosing for
or while
loop body to be skipped. In your case, the for
is the “enclosing” loop of continue
and the while loop is the “enclosing” scope of the for
loop.
According to (unofficial) documentation
The continue statement causes a jump, as if by goto to the end of the
loop body (it may only appear within the loop body of for, range-for,
while, and do-while loops).
solved how the continue statement works in for loop in C?