Constants Flashcards
Constants cannot be altered during program execution.
True
Professional best practices state that when using constants in source code the syntax should be in which format?
Upper Case
Literals are equivalent to fixed values in regard to computer programming in the C language.
True
Which data types are valid regarding integer literals for constants? Select all that apply.
Hexadecimal
Decimal
Octal
Which of the following are the parts of a floating point constant? Select all that apply.
Decimal Point
Fractional Part
Exponent Part
Integer Part
Character literals are enclosed in double quotes.
False
String literals are enclosed in double quotes.
True
When defining a constant as a preprocessor command, which of the following is the correct implementation?
define LENGTH 10
When defining a constant inside the main() function, which is the correct implementation?
const int LENGTH = 10;