main()
{
int x, y;
fl/*gate oat z;
x =/*exam*/10;
y = 20;
}
Total number of tokens = 17.
These are the tokens:
- main
- (
- )
- {
- int
- x
- ,
- y
- ;
- fl
- 10
- ;
- y
- =
- 20
- ;
- }
The comment starts with a /* and ends to the nearest */. Therefore
/*gate oat z;
x =/*exam*/
will be considered a single token.
And "fl" and "10" will be separated as two different tokens.