1,428 views
4 votes
4 votes
The number of tokens in the following expression is?
+ * * * < = & > { - + + + } ( >> ) + & &

3 Answers

17 votes
17 votes

+

*

*

*

< =

&

>

{

-

++

+

}

(

>>

)

+

& &

Totally 17

–1 votes
–1 votes

Ans is 16..

+

**

*

< =

&

>

{

-

++

+

}

(

>>

)

+

& &

I think longest match rule is applied.

Related questions

4 votes
4 votes
2 answers
2
jatin khachane 1 asked Nov 23, 2018
1,208 views
int main() { int a,b; a=10; b=15; printf("a=%d,b=%d",a++,b ); }The number of tokens in the above C program is_________.I am getting 30The answer given is 29
2 votes
2 votes
5 answers
3
Mizuki asked Nov 11, 2018
1,779 views
What it the number of tokens in the following line?printf("%d numbers.", &x);
1 votes
1 votes
2 answers
4
Lovejeet Singh asked Nov 7, 2018
1,159 views
How will the compiler detect whether "if" is a keyword or an identifier?Please tell me the concept behind this.