Which of the following is NOT a basic data type in C++?

Prepare for the ASU CSE100 Programming Exam with C++ Study Guide. Review flashcards, multiple choice questions, with hints and explanations. Master your exam!

In C++, basic data types, often referred to as built-in types, include fundamental types like integers, characters, floating-point numbers, and boolean values. The basic data types include:

  • int: Represents integer values without any decimal points.
  • char: Represents a single character.
  • bool: Represents a boolean value, which can either be true or false.

On the other hand, string is a data type that is part of the C++ Standard Library, but it is not considered a basic data type. Instead, it is a class that provides a way to work with sequences of characters as strings.

Thus, the choice identified as a string stands out because it requires the inclusion of the <string> header file and utilizes memory management and string manipulation functionalities that go beyond the inherent capabilities of the basic types. This makes ‘string’ the correct choice for the option that is NOT a basic data type in C++.

Subscribe

Get the latest from Examzify

You can unsubscribe at any time. Read our privacy policy