In C-style languages, the parts of a for loop header must be separated by semicolons rather than commas. Commas will cause a syntax error. The variable name k and postfix increment k++ are completely valid syntax, and a semicolon should not immediately follow the loop's closing parenthesis.