Server Administration

A script imports the asset identifiers "0042" and "42" from a file; they identify different servers. Which data type should represent each identifier to preserve that distinction?

Show the answer

Correct answerB. String

AWhy not this: Floating-point conversion treats the identifiers as numeric values and loses their leading-zero distinction.

BWhy this is right: A string preserves the exact characters, so "0042" remains distinct from "42".

CWhy not this: Integer conversion discards leading zeros, making both identifiers the numeric value 42.

DWhy not this: A Boolean represents a truth value, not the characters of an asset identifier.

A string preserves the identifier's characters, including leading zeros. Converting either identifier to an integer produces the same numeric value, 42, losing the distinction.