Identify the total number of tokens in the given statement
printf("A%B=",&i);
$\textrm{Total number of token is 7 here.}$
$\textrm{Option A }$
the tokens are:
printf
(
"A%B="
,
&
i
)
The semicolon at the end of the statement is not a token. It is a statement terminator that indicates the end of the statement in C-style languages.
I See that people are merely justifying the answers key with 7 tokens, but the real answer is going to be 8 tokens.
Someone missed comma, someone says semicolon is not included etc; ignore them and see the official grammar of C - both $comma$ and $semicolon$ are valid tokens.Here is breakdown for all 8 tokens in the statement :
64.3k questions
77.9k answers
244k comments
80.0k users