Lesson 5: Variables Flashcards

1
Q

These are the names you give to computer memory locations which are used to store values in a computer program.

A

Variables

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

What are the rules in naming C++ variables?

A
  1. Start with alphabets or underscore
  2. No blank space
  3. No special characters
  4. No reserved keywords
  5. Up to 31 characters long
  6. Short and precise
  7. Naming conventions
  8. Unique names
  9. Meaningful names
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

It is when you specify a type and an identifier, but have not assigned a value to the variable.

A

Variable Declaration

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

It is the process of assigning a value to the variable.

A

Variable Initialization

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

What are the 2 types of variable initialization?

A
  1. Compile Time Initialization
  2. Run Time Initialization
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

It means to provide the value to the variable during the compilation of the program.

A

Compile Time Initialization

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

In this, the user has to enter the value and that value is copied to the required variable.

A

Run Time Initialization

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

It is an attribute associated with a piece of data that tells a computer system how to interpret its value.

A

Data Type

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

What are the data types?

A
  1. Integer
  2. Character
  3. Boolean
  4. Floating Point
  5. String
  6. Double Floating Point
  7. Void or Valueless
  8. Wide Character
How well did you know this?
1
Not at all
2
3
4
5
Perfectly