valid tokens in given program

For example, consider the program

int main()
{
  // 2 variables
  int a, b;
  a = 10;
 return 0;
}

All the valid tokens are:

'int'  'main'  '('  ')'  '{'  '}'  'int'  'a'  'b'  ';'
 'a'  '='  '10'  ';' 'return'  '0'  ';'  '}'

now consider this code

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

All the valid tokens are

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

 

why ',' is not a token in the upper code while it is token in second code??

question reference :

http://geeksquiz.com/compiler-lexical-analysis/ 

http://geeksquiz.com/c-misc-question-3/

5Comments
meet @meet 29 Jan 2016 02:32 am

first link is not working @tinu

Tinu Dahiya @tinudahiya 29 Jan 2016 03:03 am
Tinu Dahiya @tinudahiya 29 Jan 2016 03:07 am

if above link again wont work then go through below step

http://geeksquiz.com  >  gate-cs-notes > Compiler Design > lexical-analysis

 

meet @meet 29 Jan 2016 03:12 am

i think it is token

just see https://en.wikipedia.org/wiki/Comma_operator

Tinu Dahiya @tinudahiya 29 Jan 2016 03:36 am

according to me comma is also be a token, but geeks wont considered it.