What are tokens and lexemes
if
, while
), identifiers (e.g., variable names like x
, total
), operators (e.g., +
, -
), and punctuation (e.g., ;
, {
).int count = 10;
, the lexemes are int
, count
, =
, 10
, and ;
. Each of these corresponds to a specific token type: int
is a keyword token, count
is an identifier token, =
is an operator token, 10
is a literal token, and ;
is a punctuation token.