Problem Statement - Token Identification
Identify the type of token (literal, identifier, keyword, punctuator etc.) in the following
1) Case 2) { } 3) break 4) O17
Solution
1) Case
is an identifier as the word starts with capital C so it can not be a keyword.
2) { }
Above are curly braces, which come under punctuators.
3) break
break is a keyword. This is often used to come out of loop or switch case constructs.
4) O17
This is an Octal Integer so it will fall under Literal. This is an Octal Integer Literal Constant.
Notes
sunmitra| Created: 23-Aug-2018 | Updated: 29-Nov-2018|
Post Views:
639