retagged by
842 views
1 votes
1 votes
1. macros are not considered as tokens in tokenizing.

2.#include considered as single token

2.stdio.h considered as single token.

 

Are the above statements true?
retagged by

1 Answer

3 votes
3 votes

Before sending the file for lexical analysis, it will be pre- processed, which will remove all the statements containting $#$.

To see what is actually sent to the lexer, use the command

cpp <input.cpp>

on Linux, to see a pre processed file.

Related questions

2.0k
views
1 answers
3 votes
Hirak asked Jun 9, 2019
2,032 views
The above diagram is Transition Diagrams for identifiers. As we can see that the identifier is said to be accepted if it starts with a letter and ends with ... delimiter and the error in declaration will not be detected at this stage...
1.9k
views
5 answers
2 votes
Mizuki asked Nov 11, 2018
1,942 views
What it the number of tokens in the following line?printf("%d numbers.", &x);
1.2k
views
2 answers
1 votes
Lovejeet Singh asked Nov 7, 2018
1,245 views
How will the compiler detect whether "if" is a keyword or an identifier?Please tell me the concept behind this.
4.4k
views
3 answers
1 votes
Balaji Jegan asked Oct 23, 2018
4,419 views
Consider the following statements$S_{1}:$ The set of string described by a rule is called pattern associated with the token.$S_{2}:$ A lexeme is a sequence of character in the ... is true $S_{1}$ is falseBoth $S_{1}$ and $S_{2}$ are false