高 double ⬅ float
⬆ long
⬆ unsigned
低 int ⬅ char、short
int a=1,b=2;
char ch1='a',ch2='b';
short s1=3,s2=5;
long l1=100;
cout<<"int + int "<<a+b<<" "<<typeid(a+b).name()<<endl;
cout<<"int + char "<<a+ch1<<" "<<typeid(a+ch1).name()<<endl;
cout<<"int + short "<<a+s1<<" "<<typeid(a+s1).name()<<endl;
cout<<"char + char "<<ch1+ch2<<" "<<typeid(ch1+ch2).name()<<endl;
cout<<"char + short "<<ch1+s1<<" "<<typeid(ch1+s1).name()<<endl;
cout<<"short + short "<<s1+s2<<" "<<typeid(s1+s2).name()<<endl;
cout<<"long+ short "<<l1+s2<<" "<<typeid(l1+s2).name()<<endl;
针对于 int 、short、char,