1,716 views
5 votes
5 votes
How many tokens are there?

1) int a /*b

2) printf ("%

1 Answer

0 votes
0 votes
Both will give lexical error,
as in first one comment doesn't end, we will not final state (make dfa for this regx)

for the second case same reason

Related questions

2 votes
2 votes
2 answers
1
Rhythm asked Jun 5, 2019
4,009 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
0 answers
2
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...
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
717 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?