- A To define a variable that can change data types
- B To define a variable of a type that the compiler will determine.
- C To define an array type variable
- D To define a container
- Share this MCQ
Answer:
B
Share this MCQ
Justification:
- A variable cannot change data type without explicitly changing or converting the data type with a code statement.
- The VAR keyword allows a variable to be defined without explicitly specifying the type; the compiler will automatically determine the data type based on the mandatory initialization expression.
- An array can be declared using a data type. For example, “int myArray[10]”, declares an array of type integer with up to 10 values.
- A container is declared using the container keyword. For example, “container myContainer”. A container can store variables of mixed data types.
Related Lesson: Variable Declaration
Click me to Read more Question & Answer of Module 12: X++ OverviewShare this MCQ