// PATn.cpp : 定義控制臺(tái)應(yīng)用程序的入口點(diǎn)。
//
#include "stdafx.h"
#include<iostream>
#include<iomanip>
#include<string>
#include<limits>
#include<iomanip>
using namespace std;
int main()
{
cout << "type: \t\t\t" << "************size**************" << endl;
cout << "short: \t\t\t" << "字節(jié)數(shù):" << sizeof(short) << endl;
cout << "最大值:" << (numeric_limits<short>::max)();
cout << "\t\t最小值:" << (numeric_limits<short>::min)() << endl;
cout << endl;
cout << "int: \t\t\t" << "字節(jié)數(shù):" << sizeof(int) << endl;
cout << "最大值:" << (numeric_limits<int>::max)();
cout << "\t最小值:" << (numeric_limits<int>::min)() << endl;
cout << endl;
cout << "unsigned: \t\t" << "字節(jié)數(shù):" << sizeof(unsigned) << endl;
cout << "最大值:" << (numeric_limits<unsigned>::max)();
cout << "\t最小值:" << (numeric_limits<unsigned>::min)() << endl;
cout << endl;
cout << "long: \t\t\t" << "字節(jié)數(shù):" << sizeof(long) << endl;
cout << "最大值:" << (numeric_limits<long>::max)();
cout << "\t最小值:" << (numeric_limits<long>::min)() << endl;
cout << endl;
cout << "unsigned long: \t\t" << "字節(jié)數(shù):" << sizeof(unsigned long) << endl;
cout << "最大值:" << (numeric_limits<unsigned long>::max)();
cout << "\t最小值:" << (numeric_limits<unsigned long>::min)() << endl;
cout << endl;
cout << "long long: \t\t" << "字節(jié)數(shù):" << sizeof(long long) << endl;
cout << "最大值:" << (numeric_limits<long long>::max)();
cout << "\t\t最小值:" << (numeric_limits<long long>::min)() << endl;
cout << endl;
cout << "unsigned long long: \t" << "字節(jié)數(shù):" << sizeof(unsigned long long) << endl;
cout << "最大值:" << (numeric_limits<unsigned long long>::max)();
cout << "\t\t最小值:" << (numeric_limits<unsigned long long>::min)() << endl;
cout << endl;
cout << "double: \t\t" << "字節(jié)數(shù):" << sizeof(double) << endl;
cout << "最大值:" << (numeric_limits<double>::max)();
cout << "\t最小值:" << (numeric_limits<double>::min)() << endl;
cout << endl;
cout << "long double: \t\t" << "字節(jié)數(shù):" << sizeof(long double) << endl;
cout << "最大值:" << (numeric_limits<long double>::max)();
cout << "\t最小值:" << (numeric_limits<long double>::min)() << endl;
cout << endl;
cout << "float: \t\t\t" << "字節(jié)數(shù):" << sizeof(float) << endl;
cout << "最大值:" << (numeric_limits<float>::max)();
cout << "\t最小值:" << (numeric_limits<float>::min)() << endl;
return 0;
}
c++內(nèi)置類(lèi)型范圍!
最后編輯于 :
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請(qǐng)聯(lián)系作者
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
【社區(qū)內(nèi)容提示】社區(qū)部分內(nèi)容疑似由AI輔助生成,瀏覽時(shí)請(qǐng)結(jié)合常識(shí)與多方信息審慎甄別。
平臺(tái)聲明:文章內(nèi)容(如有圖片或視頻亦包括在內(nèi))由作者上傳并發(fā)布,文章內(nèi)容僅代表作者本人觀點(diǎn),簡(jiǎn)書(shū)系信息發(fā)布平臺(tái),僅提供信息存儲(chǔ)服務(wù)。
相關(guān)閱讀更多精彩內(nèi)容
- 一般的數(shù)據(jù)類(lèi)型我們都很熟悉,也符合我們數(shù)學(xué)上的習(xí)慣,比如int,double,float,等之類(lèi)的,雖然自己對(duì)這方...
- bool 型為int型,一般認(rèn)為占4個(gè)字節(jié),取值TRUE/FALSE/ERROR。 sbyte 型為有符號(hào)8...
- C++基本數(shù)據(jù)類(lèi)型 References: http://www.cppblog.com/xyjzsh/archi...
- 約翰·惠特默爵士以其在教練領(lǐng)域的杰出工作獲得了國(guó)際教練聯(lián)合會(huì)授予的總裁獎(jiǎng)。他與國(guó)際績(jī)效咨詢(xún)公司(Performan...
- NULL 空地址,空指針 ,C語(yǔ)言 nil 空對(duì)象 棧上開(kāi)辟空間 指向內(nèi)存為 0 的堆地址 OC語(yǔ)言 本質(zhì)...