Write a program that tells the size of Data types of C++.


Ø Coding of Program


#include<iostream>
using namespace std;
int main()
{
cout<<"The size of int is= "<<sizeof (int)<<endl;
cout<<"The size of float is= "<<sizeof (float)<<endl;
cout<<"The size of char is= "<<sizeof (char)<<endl;
cout<<"The size of short is= "<<sizeof (short)<<endl;
cout<<"The size of long is= "<<sizeof (long)<<endl;
cout<<"The size of double long is= "<<sizeof (double long)<<endl;
cout<<"Student's Roll No:  K-F16-ES-33"<<endl;
}



Output of Program



1 comment:

Total Pageviews