1,254 views

1 Answer

Best answer
5 votes
5 votes

compiler follows greedy approach and will try to make longest pattern available. like x++ will be 2 token instead of x , + ,+ (3)

So here "01" , "!=" and ">>=" will be treated as 1 token only..

https://en.wikipedia.org/wiki/Operators_in_C_and_C%2B%2B#Compound_assignment_operators

selected by

Related questions

1 votes
1 votes
0 answers
1
Aakash_ asked Nov 20, 2018
921 views
How many tokens are there ? int main(){char name={'A','A','K','A','S','H'};return 0;}Please give any reference if possible, my doubt is about the characters in the braces...
2 votes
2 votes
2 answers
2
Rhythm asked Jun 5, 2019
4,008 views
which one of the following string can definitely said to be a token without looking at the next input:+(++,+=)return(return a)*(*=)=(==)++ , ( ) ‘ ; option e is: plu...
1 votes
1 votes
1 answer
3
Mayankprakash asked Aug 9, 2018
499 views
No of token?$a b c d + y{^3}+(2-5+x$ $6/2$$ ;$Please suggest how to count token in this type of questions?
1 votes
1 votes
1 answer
4
ankit_thawal asked Feb 1, 2018
714 views
1. macros are not considered as tokens in tokenizing.2.#include considered as single token2.stdio.h considered as single token. Are the above statements true?