What are the data types in c++ ?

What are the data types in c++?

What are the data types in c++ ?





Data Types Definition:
The data types define a set of values and a set of operations on those values.
The computer manipulates various types of data.
data types:
int: To store numeric values.
float: To store real values.
double: To store Large real values.
cher: To store character values.
Examples
 int
#include<iostream>
using namespace std;
void main()
{
int a =123
cout<<a;

}
output
123

float
#include<iostream>
using namespace std;
void main()
{
float a =1.12345
cout<<a;
}
output
1.12345

double
#include<iostream>
using namespace std;
void main()
{
double a=1.1234567
cout<<a;
}
output
1.1234567

char

#include<iostream>
using namespace std;
void main()
{
char a= ‘s’;
cout<<a;
}
output
s

Leave a Comment