【VC开源代码栏目提醒】:以下是网学会员为您推荐的VC开源代码-Ex02_3.cpp,希望本篇文章对您学习有所帮助。
//这是Ex02_3.cpp文件
//sizeof操作符
#include <iostream.h>
void main( )
{
short int aShort;
int anInt;
long aLong;
char aChar;
float aFloat;
cout<<"Data type Memory Used \n";
cout<<"--------------------------------------";
cout<<"\n short int "<<sizeof(aShort);
cout<<"\n integer "<<sizeof(anInt);
cout<<"\n long integer "<<sizeof(aLong);
cout<<"\n char "<<sizeof (aChar);
cout<<"\n float "<<sizeof(aFloat);
cout<<"\n \n \n";
}
上一篇:
Ex02_2.cpp
下一篇:
心力衰竭的中医证素及常见证型