recategorized by
4,997 views

2 Answers

Best answer
27 votes
27 votes

AnswerOption A) is Correct because lex will take more time to recognize the longer identifiers.

edited by
1 votes
1 votes

Option A: The longer the identifier, the more time it will take to scan the input string. Therefore, leading to more compilation time. Correct.

Option B: focus on the word necessary in the question. In simple language, option B can be paraphrased as

Longer identifiers in the program is a necessary condition for a program to be easier to understand which is equivalent to 

If no longer identifiers in the program, the program is not easy to understand, the contrapositive of which is

If the program is easy to understand, it has longer identifiers. 

The last implication is not a tautology. Hence option B is incorrect.

Conclusion: Option B can be made incorrect using mathematical logic.

 

 

Answer:

Related questions

16 votes
16 votes
4 answers
3
makhdoom ghaya asked Nov 8, 2016
3,651 views
An operator precedence parser is aBottom-up parser.Top-down parser.Back tracking parser.None of the above.
16 votes
16 votes
2 answers
4
makhdoom ghaya asked Nov 8, 2016
6,364 views
In a compiler the module that checks every character of the source text is called:The code generator.The code optimiser.The lexical analyser.The syntax analyser.