C++中,long double和long型的区别和联系是?刚才看书居然说都是8个字节,精度约15位,是不是书错了?
展开全部
cout<<"long double 's size "<<sizeof(long double)<<endl;
cout<<"long float 's size "<<sizeof(long float)<<endl;
cout<<"float 's size "<<sizeof(float)<<endl;
cout<<"long int 's size "<<sizeof(long int)<<endl;
cout<<"double 's size "<<sizeof(double)<<endl;
cout<<"long 's size "<<sizeof(long)<<endl;
分别是 8 , 8 ,4,4,8,4
cout<<"long float 's size "<<sizeof(long float)<<endl;
cout<<"float 's size "<<sizeof(float)<<endl;
cout<<"long int 's size "<<sizeof(long int)<<endl;
cout<<"double 's size "<<sizeof(double)<<endl;
cout<<"long 's size "<<sizeof(long)<<endl;
分别是 8 , 8 ,4,4,8,4
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询