-
Which of the following error will not come under Lexical error (Compiler Design - 1Mark)
-
Spelling error
-
Exceeding length of an identifier or numeric constants
-
Appearance of illegal characters
-
Missing semicolon
A. I only
B. II only
C. III only
D. IV only
Explanation:
Spelling error, exceeding length of identifier or numeric constants,
Appearance of illegal characters all of these will comes under Lexical Error.
Missing semicolon is a type of Syntax error.
--- I think answer should be both missing semicolon and spelling error... unmatched strings are detected in lexical phase but spelling errors will be caught in syntax phase because spelling errors make string to match with another pattern. Ex ::-- while , whiel, instead of keyword it would be recognized as variable ...
Can any one explain what is true...