nerdexam
CompTIA

DA0-001 · Question #79

Which of the following data types would a telephone number formatted as XXX-XXX-XXXX be considered?

The correct answer is D. Text. A telephone number formatted with hyphens is considered a text data type because it is composed of alphanumeric characters and symbols, and it is not intended for mathematical operations.

Data Concepts and Environments

Question

Which of the following data types would a telephone number formatted as XXX-XXX-XXXX be considered?

Options

  • ANumeric
  • BDate
  • CFloat
  • DText

How the community answered

(64 responses)
  • A
    6% (4)
  • B
    5% (3)
  • C
    2% (1)
  • D
    88% (56)

Why each option

A telephone number formatted with hyphens is considered a text data type because it is composed of alphanumeric characters and symbols, and it is not intended for mathematical operations.

ANumeric

While composed primarily of digits, the inclusion of hyphens means it's not purely numeric; more importantly, telephone numbers are not used in mathematical operations like addition or averaging.

BDate

A telephone number has no relation to a date or time value.

CFloat

Float is a numeric data type used for storing decimal numbers, which is inappropriate for a phone number that is not used in calculations and may contain non-numeric characters.

DTextCorrect

A telephone number formatted as XXX-XXX-XXXX contains hyphens, which are non-numeric characters, making it unsuitable for mathematical calculations. Therefore, it is best stored and treated as a text or string data type to preserve its exact format and character sequence.

Concept tested: Data type identification (text vs. numeric)

Source: https://learn.microsoft.com/en-us/training/modules/csharp-define-data-types/3-numeric-non-numeric-data-types

Topics

#Data types#Data classification#Data concepts

Community Discussion

No community discussion yet for this question.

Full DA0-001 Practice