Variables Flashcards
1
Q
Which of the following is true regarding a variable in C?
A
- has a specific type
- the data type determines the size of the variable
- the data type determines the set of operations that can be applied to the variable
- the data type determines the range of values that can be stored
- the data type determines the layout of the variable’s memory
2
Q
Char
A
Typically one byte and is an integer type
3
Q
Int
A
the most natural size of integer for the machine
4
Q
Float
A
A single precision floating point value
5
Q
Double
A
A double-precision floating point value
6
Q
Void
A
Represents the absence of type
7
Q
A variable definition must include as a minimum which of the following? Select all that apply.
int variableName = 53;
A
Semi-colin
Data type
Valid name
8
Q
Which of the following is true regarding variable definition in C? Select all that apply.
A
- has its meaning at the time of compilation only
- is useful when you are using multiple files
- provides assurance to the compiler that there exists a variable with the given type and name