Lecture6 Data Types
Lecture6 Data Types
All variables use data type during declaration to restrict the type of
data to be stored. Therefore, we can say that data types are used to tell
the variables the type of data they can store. Whenever a variable is
defined in C++, the compiler allocates some memory for that
variable based on the data type with which it is declared. Every data
type requires a different amount of memory.
C++ supports a wide variety of data types and the programmer can
select the data type appropriate to the needs of the application. Data
types specify the size and types of values to be stored.
Types Of Data Types
The character data type in C++ is a fundamental data type used to store a
single character. It occupies 1 byte in memory. A character array holds
multiple character values in contiguous memory locations.
Character Array & String