Login
Register
Dark Mode
Brightness
Profile
Edit Profile
Messages
My favorites
My Updates
Logout
Recent questions tagged compiler-tokenization
6
votes
7
answers
61
Type of error
Find the type of error produced by the following C code. main() { in/*comment t x; floa/*comment*/t gate; } Lexical error syntax error both a) and b) None of these
Find the type of error produced by the following C code.main() { in/*comment t x; floa/*comment*/t gate; }Lexical errorsyntax errorboth a) and b) None of these
Ashwani Kumar 2
5.1k
views
Ashwani Kumar 2
asked
Feb 7, 2017
Compiler Design
lexical-analysis
syntax-analysis
compiler-tokenization
+
–
8
votes
2
answers
62
Compiler Design, Number Of Tokens
The number of tokens in following program? # define M 100 int main ( ) { // declare variables int n = 2020; return n % M; } Your Answer:19 Correct Answer: 16 Status: incorrect
The number of tokens in following program?# define M 100 int main ( ) { // declare variables int n = 2020; return n % M; }Your Answer:19Correct Answer: 16 Status: inco...
vishwa ratna
4.9k
views
vishwa ratna
asked
Jan 18, 2017
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
2
answers
63
Number of Tokens
$/* abc */Printf("what's \ up \ \%d",++ \&\&***a);$
$/* abc */Printf("what's \ up \ \%d",++ \&\& *a);$
monty
523
views
monty
asked
Jan 13, 2017
Compiler Design
compiler-design
compiler-tokenization
+
–
4
votes
3
answers
64
MadeEasy Subject Test: Compiler Design - Lexical Analysis
Is the given answer correct?
Is the given answer correct?
Lucky sunda
1.6k
views
Lucky sunda
asked
Jan 6, 2017
Compiler Design
made-easy-test-series
compiler-design
compiler-tokenization
lexical-analysis
+
–
0
votes
0
answers
65
[Compiler Design] Distinct tokens vs Distinct lexemes
Question1. Count number of Distinct tokens and lexemes in following code { float a=20.6; float b=19.8; float c=19.8; float a=20.6; float c=15.7; printf("Hello!How r u"); printf("I am Good"); } ... same as token is just a representation of lexemes associated with it?So by this the answer to 2 and 3 statement will be true?
Question1. Count number of Distinct tokens and lexemes in following code{float a=20.6;float b=19.8;float c=19.8;float a=20.6;float c=15.7;printf("Hello!How r u");printf("...
rahul sharma 5
1.5k
views
rahul sharma 5
asked
Dec 26, 2016
Compiler Design
compiler-design
compiler-tokenization
+
–
0
votes
1
answer
66
Counting Tokens
Count tokens in following - 1. in/*Hello!How are you/*t=10; I know that comments will be ignored,but now will in and t are two separate tokens or one?Please explain reason also 2. int a;// a is variable 3. int // a is variable;
Count tokens in following -1. in/*Hello!How are you/*t=10;I know that comments will be ignored,but now willin and tare two separate tokens or one?Please explain reason ...
rahul sharma 5
647
views
rahul sharma 5
asked
Dec 25, 2016
Compiler Design
compiler-design
compiler-tokenization
+
–
14
votes
2
answers
67
Tokenization in lexical analysis
Consider the following C program: int main (void) { in/*this is an example*/z; double/*is it an error?*/y; print( “This is simple” ); return 0; } - How many Different tokens are there in the above code.
Consider the following C program: int main (void) { in/*this is an example*/z; double/*is it an error?*/y; print( “This is simple” ); return 0; }- How many Different ...
dd
3.3k
views
dd
asked
Dec 13, 2016
Compiler Design
compiler-design
compiler-tokenization
lexical-analysis
+
–
1
votes
2
answers
68
No of Tokens
Find no of Tokens in bellow program int main() { a=b+c; "printf("%d%d%d,a,b,c")"; } nd my other doubt is if we replace a=b+c to "a=b+c or a=b+c" will it give lexical error nd if ,then in which case.
Find no of Tokens in bellow programint main(){ a=b+c;"printf("%d%d%d,a,b,c")";}nd my other doubt is if we replace a=b+c to "a=b+c or a=b+c" will it give lexical error n...
saurabh rai
2.8k
views
saurabh rai
asked
Nov 15, 2016
Compiler Design
compiler-tokenization
compiler-design
+
–
16
votes
2
answers
69
Find Number Of Tokens and Lexemes
// comment printf("string %d ",++i++&&&i***a); return(x?y:z) Q1] Find Number of Tokens and Lexems in the above code snippet Q2 ] *** -> counted as 1 token or 3 tokens ? why it is so Q3 ] ... single token or separate token Q4 ] If the Question would have been count the number of unique lexemes and tokens what would have been the answer ?
// comment printf("string %d ",++i++&&&i *a); return(x?y:z)Q1] Find Number of Tokens and Lexems in the above code snippetQ2 ] * - counted as 1 token or 3 tokens ? wh...
pC
12.3k
views
pC
asked
Oct 21, 2016
Compiler Design
compiler-design
compiler-tokenization
+
–
3
votes
1
answer
70
GATE Overflow | Programming | Test 1 | Question: 16
What is the number of tokens in the below C code? int foo(int i, int j){ return printf(" I do it correctly", i > j); }
What is the number of tokens in the below C code?int foo(int i, int j){ return printf(" I do it correctly", i j); }
Arjun
908
views
Arjun
asked
Oct 18, 2016
Programming in C
go-programming-1
programming
compiler-tokenization
numerical-answers
+
–
0
votes
1
answer
71
Laxical Analysis
cosider the following normal statement: DO 5 I =1.25 also consider the following FORTRAN 90 statement: D0 5 I = 1.25 the difference between numbers of tokens in both the statement is____??? my doubt is what is FORTRAN 90?? what is difference between normal way of creating a token and this lang??
cosider the following normal statement:DO 5 I =1.25also consider the following FORTRAN 90 statement:D0 5 I = 1.25the difference between numbers of tokens in both the stat...
Hira Thakur
698
views
Hira Thakur
asked
Sep 26, 2016
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
1
votes
1
answer
72
Is 1.02e+4 is a token in C program...??
dhairya
465
views
dhairya
asked
Aug 28, 2016
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
1
answer
73
Token
What is token and how use it?
What is token and how use it?
jeewan0011
454
views
jeewan0011
asked
Aug 22, 2016
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
0
votes
1
answer
74
tokens
which of following symbols made as token by depending on next symbol? a=b>c<d#
which of following symbols made as token by depending on next symbol?a=b>c<d#
Naveen Chowdary 1
798
views
Naveen Chowdary 1
asked
Jun 29, 2016
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
1
votes
1
answer
75
strange compiler error
void main() { 123e-23; 12334; 'A'; no compiler error "Abbdv"; } void main { {'A','b','b','d','v','\0'}; compiler error {1,2,3,4}; }
void main(){123e-23;12334;'A'; no compiler error"Abbdv";}void main{ {'A','b','b','d','v','\0'}; ...
Sourabh Kumar
338
views
Sourabh Kumar
asked
May 19, 2016
Programming in C
programming-in-c
compiler-tokenization
+
–
3
votes
1
answer
76
Ace Test Series: Compiler Design - Lexical Analysis
Tushar Shinde
1.3k
views
Tushar Shinde
asked
Jan 24, 2016
Compiler Design
ace-test-series
compiler-design
lexical-analysis
compiler-tokenization
+
–
2
votes
4
answers
77
TestBook Test Series: Compiler Design - Lexical Analysis
I think answer should be 13. We got 13 tokens printf ( "string" ++ & & * * * a ) ;
I think answer should be 13. We got 13 tokensprintf ( "string" ++ & & * * * a ) ;
Akash Kanase
1.3k
views
Akash Kanase
asked
Jan 19, 2016
Compiler Design
testbook-test-series
compiler-design
lexical-analysis
compiler-tokenization
numerical-answers
+
–
6
votes
3
answers
78
Calculating number of tokens
Given solution: Please explain how the number of tokens are 11.
Given solution:Please explain how the number of tokens are 11.
shikharV
18.5k
views
shikharV
asked
Jan 19, 2016
Compiler Design
compiler-tokenization
compiler-design
testbook-test-series
numerical-answers
+
–
0
votes
0
answers
79
Find Number of Lexeme and Tokens
Find Number Of Lexeme And Tokens in the Below FORTRAN Code. [ ignore the white spaces only ] ( pls also explain me what do the code mean ) DO 10 I = 100 DO 10 I=10,1 DO 10 I = 10.1
Find Number Of Lexeme And Tokens in the Below FORTRAN Code. [ ignore the white spaces only ]( pls also explain me what do the code mean )DO 10 I = 100DO 10 I=10,1DO 10 I ...
pC
1.4k
views
pC
asked
Jan 11, 2016
Compiler Design
compiler-tokenization
out-of-syllabus-now
+
–
0
votes
2
answers
80
Counting number of lexemes
The number of lexemes in the statement in FORTRAN DO 10 I = 100 is __________ .
The number of lexemes in the statement in FORTRANDO 10 I = 100is __________ .
shikharV
1.9k
views
shikharV
asked
Nov 19, 2015
Compiler Design
compiler-design
lexical-analysis
compiler-tokenization
+
–
3
votes
3
answers
81
Couting the number of reduce moves
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
The maximum number of reduce moves that can be taken by a bottom-up parser with no epsilon and unit productions to parse a string of length 3 tokens is ____ ?
shikharV
768
views
shikharV
asked
Nov 13, 2015
Compiler Design
compiler-design
context-free-grammar
compiler-tokenization
numerical-answers
+
–
1
votes
1
answer
82
How is escape sequence tokenised in c compiler.
How tokens are assigned for a string having escape sequence in C lexical phase Eg.. printf ("this\" is a string\""); and what for printf ("this is""a string");
How tokens are assigned for a string having escape sequence in C lexical phaseEg..printf ("this\" is a string\"");and what forprintf ("this is""a string");
admin
645
views
admin
asked
Oct 15, 2015
Programming in C
compiler-tokenization
+
–
41
votes
7
answers
83
GATE CSE 2000 | Question: 1.18, ISRO2015-25
The number of tokens in the following C statement is printf("i=%d, &i=%x", i, &i); $3$ $26$ $10$ $21$
The number of tokens in the following C statement isprintf("i=%d, &i=%x", i, &i);$3$$26$$10$$21$
Kathleen
36.4k
views
Kathleen
asked
Sep 14, 2014
Compiler Design
gatecse-2000
compiler-design
compiler-tokenization
easy
isro2015
+
–
Page:
« prev
1
2
3
Email or Username
Show
Hide
Password
I forgot my password
Remember
Log in
Register