C++ Program To Display Size Of Different Datatype on Command Line Full Project For Beginners

  • Post author:
  • Post category:c++
  • Post comments:0 Comments

 

 

main.cpp

 

 

#include<iostream>
#include<math.h>
using namespace std;
int main()
{
 cout<<"size of int "<<sizeof(int)<<endl;
 cout<<"size of float "<<sizeof(float)<<endl;
 cout<<"size of double "<<sizeof(double)<<endl;
 cout<<"size of long "<<sizeof(long)<<endl;
 cout<<"size of long double "<<sizeof(long double)<<endl;
 cout<<"size of long long int "<<sizeof(long long int)<<endl;
 cout<<"size of long long "<<sizeof(long long)<<endl;


}

Leave a Reply