A data type specifies the type of data that we can work with. As C++ is a strongly typed (not truly) language (type is specified before use), type of a variable must be specified before it is used. C++ provides several pre-defined data types. They are as shown in the following table: Character data type The char data type is used to work with single characters. An example of storing a character into a variable is as follows: char ch = ‘s’; In the above statement, ‘s’ is a character constant. Size of char type is 1 byte which
The post What are the datatypes in C++ appeared first on Coding Security.
What are the datatypes in C++
read more
Tidak ada komentar:
Posting Komentar