RECENTLY PUBLISHED

6/recent/ticker-posts

Sizeof Operator in C / C++.

Use Of SIZEOF() Operator In C/C++.


 #include<iostream>


using namespace std;


int main()


{  


  int a;  


 char ch;  


 float m;    


double n;   


 long d;  


  short b;


  cout<<"Size of integer is:"<<sizeof(a)<<endl;   


cout<<"Size of character is:"<< sizeof(ch)<<endl;


   cout<<"Size of float is:"<<sizeof(m)<<endl;

 

   cout<<"Size of double is:"<<sizeof(n)<<endl;  


 cout<<"Size of long integer is:"<<sizeof(d)<<endl;


   cout<<"Size of short integer is:"<<sizeof(b)<<endl;


 return 0;


}




INPUT && OUTPUT





Post a Comment

0 Comments