Constants Flashcards

1
Q

Constants cannot be altered during program execution.

A

True

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

Professional best practices state that when using constants in source code the syntax should be in which format?

A

Upper Case

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

Literals are equivalent to fixed values in regard to computer programming in the C language.

A

True

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

Which data types are valid regarding integer literals for constants? Select all that apply.

A

Hexadecimal
Decimal
Octal

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

Which of the following are the parts of a floating point constant? Select all that apply.

A

Decimal Point
Fractional Part
Exponent Part
Integer Part

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

Character literals are enclosed in double quotes.

A

False

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

String literals are enclosed in double quotes.

A

True

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

When defining a constant as a preprocessor command, which of the following is the correct implementation?

A

define LENGTH 10

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

When defining a constant inside the main() function, which is the correct implementation?

A

const int LENGTH = 10;

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