IEO Level 2- English Olympiad (SOF) Class 9 Coaching Programs
β³ π― Online Tests (2 Tests [50 Questions Each]): NTA Pattern, Analytics & Explanations
Click Here to View & Get Complete Material
Rs. 200.00
3 Year Validity (Multiple Devices)
π Study Material (303 Notes): 2024-2025 Syllabus
Click Here to View & Get Complete Material
Rs. 450.00
3 Year Validity (Multiple Devices)
π― 250 MCQs (& PYQs) with Full Explanations (2024-2025 Exam)
Click Here to View & Get Complete Material
Rs. 200.00
3 Year Validity (Multiple Devices)
Computer Science: Introduction to C ++ : Tokens and Identifiers
Tokens
- A token is a group of characters that logically belong together. The programmer can write a program by using tokens.
- C ++ uses the following types of tokens.
Keywords
There are some reserved words in C ++ which have predefined meaning to complier called keywords.
Some commonly used keywords are given below:
Identifiers
- Symbolic names can be used in C ++ for various data items used by a programmer in his program. For example, if a programmer wants to store a value 50 in a memory location, he/she choose any symbolic name (say MARKS) and use it as given below:
- MARKS = 50
- The symbol is an assignment operator.
- The significance of the above statement is that βMARKSβ is a symbolic name for a memory location where the value 50 is being stored.
- A symbolic name is generally known as an identifier. The identifier is a sequence of characters taken from C ++ character set.
The rules for the formation of an identifier are:
- An identifier can consist of alphabets, digits and/or underscores.
- It must not start with a digit.
- C ++ is case sensitive, i.e.. , upper case and lower-case letters are considered different form each other. It may be noted that TOTAL and total are two different identifier names.
- It should not be a reserved word.