Discussion
In the statement count = count + 1, the number of lexemes is
Answer: C
Correct answer: five, counting each identifier, operator and literal separately
The lexemes are count, =, count, + and 1 - five in all. The identifier count appears twice and is counted twice, because a lexeme is an occurrence in the input rather than a distinct name; the two occurrences produce two tokens that happen to carry a pointer to the same symbol table entry.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development