C++ Data Types - Learn C++ Programming

Today, we will learn C++ Data TypesLearn C++ Programming . So, In this Chapter, will talk about data types of c++ and will make it easy to understand.

C++ has several types of data-types. So, as I explained in the variable chapter, a variable in C++ much be a specified data type.

Example:

int myInt = 10;           // Integers(Whole Number without decimals).
float myFloatNum = 10.99   // Floating point number(with decimals).
double myDoubleNum = 10.99;     // Floating point number(with decimals).
char myLetter = 'A';         // Character 
string myString = "Hello";   // string (Text)
bool myBoolVal = true;        // Boolean (True and False)

Basic Data Types:

We specify the data types with the size and type of information in the variable store. So, Check out the below.

Data TypeSizeDescription
int4 bytesStores whole numbers, without decimals
float4 bytesStores fragmentary numbers, containing at least one decimals. Adequate for putting away 7 decimal digits
double8 bytesStores partial numbers, containing at least one decimals. Adequate for putting away 15 decimal digits
char1 bytesStores a single character and letter and number, or ASCII values
boolean1 bytesStores true or false values
Basic Data Types details

You will learn more about data types individually, In the Next chapters. So, I am giving Complete Course link here click here to get Free course Learn C++.

So, take the benefits to learn c++ from here, because, I provide here this course 100% Free of cost, Share this course link with your class-fellows and friends.

But, Don’t forget to subscribe and giving feedback/ comment below the section.

In C++ programming, we will cover all topics and provide quality content, but, you should be gain your focus on this course and do a lot of practices in your Dev-C++ or VS Code. So you should love your field.

So, Follow us on FB Page: TCMaster Page

Go to Home

By Usama Arshad

It's me Usama Arshad working as a Lecturer C++. I am a student of BSIT.

Leave a Reply

Your email address will not be published. Required fields are marked *