Recent questions tagged compiler-tokenization

6 votes
1 answer
32
1 votes
1 answer
33
void main() { int total-value, Num=2,sum=5,var1; 5=Num; var1=2; sum=num*1; if(sum=var1) { sum=sum+1 } }Here, is $\text{"total-value"}$ a lexical error?
3 votes
4 answers
34
1 votes
1 answer
35
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?
1 votes
0 answers
36
# DEFINE M 100 int main() { // declare variables int n = 2020; return n%M; }The number of tokens in this program?
1 votes
1 answer
37
Find no of tokens in following code:#define square(x) x*x int main(){ int a=square(2); printf("%d", a); return 0; }Does macro expansion effect the tokens count??
5 votes
1 answer
38
How many tokens are there?1) int a /*b2) printf ("%
6 votes
1 answer
39
Is this line a/*b successfully generating the token's or it give lexical error ? if it is given the lexical error then why so ?I think it will give lexical error because...
1 votes
2 answers
40
2 votes
1 answer
42
1 votes
1 answer
44
Which of the following not a token of C program?a)1.02e+2b)#definec)MAXd)123.33
7 votes
4 answers
46
3 votes
1 answer
51
How many tokens are there in the following statement:x > = 2; In general, are shorthand operators counted as a single token as ">>=" or double as ">>" and "=". Or anythin...
6 votes
1 answer
52
Given answer is 25, while my answer is 26, they have considered -10.0 as single token, which is wrong?
10 votes
3 answers
53
2 votes
1 answer
54
This screenshot is token from the book Ullman,How can following be a lexical error? because "elipseSize" should have a token recorded as an identifier.
1 votes
1 answer
55
What is difference between lexems and tokens please explain with example
3 votes
1 answer
56
1 votes
2 answers
58
0 votes
0 answers
59
find number of tokens?1 .abc*def+xyz=52. abc*+