首页 > 试题广场 >

声明与下述描述相符的变量。 a. short整数,值为

[问答题]
声明与下述描述相符的变量。
a. short整数,值为80
b. unsigned int 整数,值为42110
c. 值为3000000000的整数
推荐
short rbis = 80;                                  // or short int rbis = 80;
unsigned int q = 42110;                    // unsigned q = 42110;
unsigned long ants = 3000000000;
// or long long ants = 3000000000;
注意:不要指望int变量能够存储3000000000;另外,如果系统支持通用的列表初始化,可使用它:
short rbis = {80};                               // = is optional
unsigned int q {42110};                    // could use = {42110}
long long ants {3000000000};
发表于 2018-05-07 10:56:10 回复(0)
short sData = 80;
unsigned int unData = 42110;
unsigned long ulData = 3000000000;

发表于 2019-10-31 10:12:19 回复(0)