You are a junior IT support specialist. A client asks you to troubleshoot a program crash. Upon investigation, you find that the program is crashing when attempting to process user ages. If the age variable is defined using an inappropriate data type, which data type should it be set to?
The correct answer is 'Integer'. An integer data type is most appropriate for representing whole numbers like age. 'Boolean' is used for true/false values, 'String' is used for sequences of characters, and 'Float' is used for decimal numbers.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
Why is the Integer data type used for age?
Open an interactive chat with Bash
What are the characteristics of different data types like Boolean, String, and Float?
Open an interactive chat with Bash
What could happen if the wrong data type is used for age in programming?