C++ TutorialLesson 9Free preview
C++ Data Types
This lesson is part of C++ · All levels
Summary
This lesson describes the types of data available in C++, which are specifications that determine the type and size of data that can be stored in a variable. Choosing the right data type makes the program more memory-efficient and free of error-free calculations. You'll know the primitive data types like int, double, char, and bool, as well as the string types for the text.
Key points
- The data type determines the type of value, size, and range of data that can be stored.
- Int for integers, float/double for decimal numbers.
- Char keeps one character, while string keeps many characters.
- Bool only keeps two logical values: true or false.
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.