CompTIA
FC0-U71 · Question #86
Given the following data sequence: 1, 10, 2, 3, 4, 5, 6, 7, 8, 9 Which of the following data types are these values an example of?
The correct answer is C. Boolean. Although the values look like numbers, the ordering (1, 10, 2, 3...) suggests they are being treated as strings, not numerical values. In string sorting, "10" comes after "1" but before "2" due to character- by-character comparison.
Software Development Concepts
Question
Given the following data sequence:
1, 10, 2, 3, 4, 5, 6, 7, 8, 9 Which of the following data types are these values an example of?
Options
- AFloat
- BASCII
- CBoolean
- DString
How the community answered
(23 responses)- A9% (2)
- B4% (1)
- C87% (20)
Explanation
Although the values look like numbers, the ordering (1, 10, 2, 3...) suggests they are being treated as strings, not numerical values. In string sorting, "10" comes after "1" but before "2" due to character- by-character comparison.
Topics
#Data Types#Boolean Logic#Truthiness#Programming Fundamentals
Community Discussion
No community discussion yet for this question.