void addChar() {
if (lexLen <= 98) {
lexeme[lexLen++] = nextChar;
lexeme[lexLen] = 0;
} else {
printf("Error - lexeme is too long \n");
}
}
This is a snippet from a simple lexical analyzer...
I'm not sure what the line lexeme[lexLen++] = nextChar; does.
And in the next line, why does it assign 0 to lexLen.
It's original comment said its to add nextChar into lexeme, but I don't get how it does that.
lexLen++is a postfix increment, so you are setting 0 on higher index in the lexeme array