
B站学习练习代码
2.1整型#include
using namespace std;
/*
short,int,long longlong
*/
int main2_1()
{
short a = 1;
cout << sizeof(a)<<sizeof(long);
system("pause");
return 0;
}
#2.2 sizeof关键字
#include
using namespace std;
int main2_2()
{
cout << sizeof(int)<<endl;
cout<<sizeof(short)<<endl;
cout<<sizeof(long)<<endl;
cout<<sizeof(long long)<<endl;
system("pause");
return 0;
}
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)