Study for the CompTIA ITF+ Exam. Enhance your tech literacy with multiple-choice questions and detailed explanations. Prepare thoroughly and succeed!

Each practice test/flash card set has 50 randomly selected questions from a bank of over 500. You'll get a new set of questions each time!

Practice this question and more.


Which of the following data types should a developer use when creating a variable to hold a postal code?

  1. Integer

  2. Float

  3. String

  4. Boolean

The correct answer is: String

A postal code is a series of letters and numbers, so the appropriate data type to use would be a string to hold both characters and numbers. Integer and float data types are typically used for mathematical operations, while boolean data type is used to represent true or false values. Therefore, these options would not be appropriate for holding a postal code.