/** * 特征:说明。浅谈数据类型的大小 * 时刻:2014年8一个月10日本11:02:02 * 笔者:cutter_point */ #include<iostream> using namespace std; int main() { char c; unsigned char cu; short int is; short iis; unsigned short int isu; unsigned short iisu; int i; unsigned int iu; long int il; long iil; unsigned long int ilu; unsigned long iilu; float f; double d; long double ld; cout <<" char= "<<sizeof(c) <<" unsigned= "<<sizeof(cu) <<" short int= "<<sizeof(is) <<" short= "<<sizeof(iis) <<" unsigned short int= "<<sizeof(isu) <<" unsigned short= "<<sizeof(iisu) <<" int= "<<sizeof(i) <<" unsigned int= "<<sizeof(iu) <<" long int= "<<sizeof(il) <<" long= "<<sizeof(iil) <<" unsigned long int= "<<sizeof(ilu) <<" unsigned long= "<<sizeof(iilu) <<" float= "<<sizeof(f) <<" double= "<<sizeof(d) <<" long double= "<<sizeof(ld) <<endl; return 0; }
版权声明:本文博主原创文章,博客,未经同意不得转载。