UrbanPro
true

Take Class 12 Tuition from the Best Tutors

  • Affordable fees
  • 1-1 or Group class
  • Flexible Timings
  • Verified Tutors

Plus two computer application chapter 1

Akhila N.
12/03/2023 0 0

1. What are token? What are different types of tokens used in C++?

Tokens are the basic building blocks of a C++ program. There are five types of tokens in C++.

1. Key words: Key words are tokens that carry a specific meaning to the language compiler.

Eg. int, switch etc..

2. Identifiers: Identifiers are user defined words that are used to name different program elements

such as memory locations, statements, functions, classes etc.

 Identifiers used for naming memory location is known as variables.

 Identifiers assigned to statements are known as labels.

 Identifiers used for set of statements are known as functions.

3. Literal : Literals are data items that never change their values during the program running. They

are also known as constants. There are 4 types of literals

a) Integer literal: tokens formed only by digits. It must have at least one digit and must

not have decimal point. It may contain +ve or _ve sign as first character

 Eg. 15, -20, +40

b) Floating Point Literal (Real constants): They have fractional part. They can be

written in two forms: Fractional and exponential form.

 They have at least one digit and a decimal point. They have either +ve or –ve sign.

In exponential form, there are two parts, Mantissa (Parts appearing before E) and

Exponential(Power).

 Eg: 52.15, -715.12, .458E04

c) Character Literal : Single character enclosed with single quotes and that never

changes its value during program run. Non graphical symbols can be represented by

using escape sequence which consists of a back slash(\) followed by one or more

characters. (eg. \n, \a)

Eg. Valid Character Literal: ‘s’, ‘$’,’\n’

 Invalid Character Literal: ‘82’, “k”, ‘\8’

d). String Literals: Sequence of one or more characters enclosed within a pair of

double quotes.

 Eg. “computer”. Every string in C++ terminated by a null (\o) character.

4. Punctuators: Special symbols that have syntactic or semantic meaning to the compiler.

 Eg: #, : , ’ , ” ,() ,[]

0 Dislike
Follow 1

Please Enter a comment

Submit

Other Lessons for You


Nature and Significance of Principles of Management-HSC | Class 12
OC/OCM, Business Studies - Nature of Principles of Management | Significance of Principles of Management

Science
How does a plane fly?
P

PATH institute

0 0
0

Logarithm with JEE Example
JEE 2011 Question on Logarithm Let (x0,y0) be the solution of the following equations: (2x)ln2 = (3y)ln3 3lnx = 2lnyThen x0 is(A)1 6(B)1 3(C)1 2(D) 6Answer and Comments: (C). We can treat the data as...

How To Prepare For CBSE Class 12 Board Exam ?
How to prepare for the CBSE Class 12 Board Exam? In this lesson, I will teach you how to prepare for the CBSE Class 12 Board Exam. Your class 12 board exam is probably the most important exam in your...
A

Abraham Paul

3 0
0
X

Looking for Class 12 Tuition Classes?

The best tutors for Class 12 Tuition Classes are on UrbanPro

  • Select the best Tutor
  • Book & Attend a Free Demo
  • Pay and start Learning

Take Class 12 Tuition with the Best Tutors

The best Tutors for Class 12 Tuition Classes are on UrbanPro

This website uses cookies

We use cookies to improve user experience. Choose what cookies you allow us to use. You can read more about our Cookie Policy in our Privacy Policy

Accept All
Decline All

UrbanPro.com is India's largest network of most trusted tutors and institutes. Over 55 lakh students rely on UrbanPro.com, to fulfill their learning requirements across 1,000+ categories. Using UrbanPro.com, parents, and students can compare multiple Tutors and Institutes and choose the one that best suits their requirements. More than 7.5 lakh verified Tutors and Institutes are helping millions of students every day and growing their tutoring business on UrbanPro.com. Whether you are looking for a tutor to learn mathematics, a German language trainer to brush up your German language skills or an institute to upgrade your IT skills, we have got the best selection of Tutors and Training Institutes for you. Read more