Lesson 2 Flashcards

(8 cards)

1
Q

is a container (storage area) to hold data.

A

Variable

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

are data used for representing fixed values. They can be used directly in the code.

A

Literals

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

Rules for naming a variable

• A variable name can only have letters (both uppercase and lowercase letters), digits and
underscore.

• The first letter of a variable should be either a letter or an underscore.
• There is no rule on how long a variable name (identifier) can be. However, you may run into
problems in some compilers if the variable name is longer than 31 characters.

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

a numeric literal (associated with numbers) without any fractional or exponential part.

A

Integers

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

three types of integer literals in C programming:

A
  1. decimal (base 10)
  2. octal (base 8)
  3. hexadecimal (base 16)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

a numeric literal that has either a fractional form or an exponent form.

A

Floating-point Literals

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

is a sequence of characters enclosed in double-quote marks.

A

String Literals

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

created by enclosing a single character inside single quotation marks

A

Floating-point Literals

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