The number of tokens in the following ‘C’ language statement is: printf("The…
2017
The number of tokens in the following ‘C’ language statement is:
printf("The number of tokens are %d", &tcount);
- A.
8
- B.
9
- C.
10
- D.
11
Attempted by 138 students.
Show answer & explanation
Correct answer: A
In C, a token is the smallest individual unit. The statement printf("The number of tokens are %d", &tcount); is broken into 8 tokens:
printf(Identifier)((Delimiter)"The number of tokens are %d"(String Literal),(Delimiter)&(Operator)tcount(Identifier))(Delimiter);(Delimiter)
Hence, the correct option is A.