310 views

1 Answer

2 votes
2 votes

printf  (  "i=%d,&i=%x"  ,  i  &  i  )   ;
------  -- ---------------- -- -- -- -- -- --

Total tokens = 9

Keyword is 1 token (printf).
Pair of brackets are 2 token.
The whole string starting from " and ending with " and everything inside is 1 token.
Semicolon, Comma are 1 token each.
Variables are 1 token each.
Operator(&) is 1 token.

For detailed study on what else comprises tokens and how to find the total count you have to study the standard book (Best option) and solve different questions.
Here is something to get you started : http://cnuinfotech-cd.blogspot.in/2012/06/tokens-patterns-and-lexemes.html  http://www.geeksforgeeks.org/compiler-lexical-analysis/

Related questions

0 votes
0 votes
0 answers
1
Gatetarget_100 asked Aug 3, 2018
548 views
int main() { int a[10]; printf("%d",*a+1-*a+3); return 0; }Answer is given as 4 but i think it should be 8, if int is of 4 byte. Correct me if i am wrong
0 votes
0 votes
0 answers
2
Harikesh Kumar asked Dec 4, 2017
191 views
1 votes
1 votes
1 answer
3
aaru14 asked Oct 11, 2017
248 views
i=0;j= i ;printf( i++ + i + i + j + i + i);the output??
0 votes
0 votes
1 answer
4
Harikesh Kumar asked Jun 3, 2017
6,392 views
If the address of A and A are 1000 and 1010 respectively and each element occupies 2 byte then the array has been stored in which order ?1.row major 2.column major 3....