Lesson 3: C++ Tokens Flashcards

1
Q

The smallest element of a program
that is meaningful to the compiler.

A

token

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

used to store information to be referenced and manipulated in a computer program. ( Or in Short It Is the Container that holds the value)

A

Variables

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

________ is a name used to identify a variable, function, class, module, or any other user-defined item.

A

Identifier

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Used to Indicate Integers

A

int

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Used to store floating-point number (decimals and exponential)

A

float & double

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Used in conditional statements and loops

A

bool

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Used for characters and are enclosed inside single quotes

A

char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Used in storing text

A

string

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What are the meaning of these Data Types:
1. int
2. float
3. double
4. char
5. bool
6. string

A
  1. Integer
  2. Floating-point
  3. Double floating-point
  4. Character
  5. Boolean
  6. Text
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What are the sizes (in Byte) of these Data Types:
1. int
2. float
3. double
4. char
5. bool
6. string

A

1.) 2 or 4
2.) 4
3.) 8
4.) 1
5.) 1
6.) Depending on how many char

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

__________ are expressions with a fixed value.

A

Constants

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

_________ are the most obvious kind of
constants. They are used to express particular
values within the source code of a program.

A

Literals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

These are numerical constants that identify integer values. They don’t need to be enclosed in quotes or other special character.

A

Integer Numerals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Express real values, with decimals and/or exponents. They can include either a decimal point, an e character that expresses scientific notations.

A

Floating Point Numerals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

C++ allows the use of octal numbers (base 8) and hexadecimal numbers (base 16) as literal constants. For octal literals, the digits are preceded with a 0 (zero) character and for hexadecimal they are preceded by the characters 0x (zero, x)

A

Decimal Numerals

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the default type for floating-point literals

A

double

14
Q

They are enclosed in quotes.

A

Character and String Literals

15
Q

newline

A

\n

16
Q

carriage return

A

\r

17
Q

vertical tab

A

\v

17
Q

alert (beep)

A

\a

17
Q

tab

A

\t

18
Q

backspace

A

\b

19
Q

form feed (page feed)

A

\f

20
Q

single quote ( ‘ )

A

'

21
Q

double quote ( “ )

A

"

22
Q

question mark ( ? )

A

\?

23
Q

backslash ( \ )

A

\