有下面语句:auto a = 2u; auto b = 3; int i = 1; auto v = i == 2 ? a : b;v的类型是:
A: unsigned int
B: int
C: long
D: unsigned long
A: unsigned int
B: int
C: long
D: unsigned long
举一反三
- 假设有 auto func() { auto a = 2u; auto b = 3L; return a + b; } 那么auto v = func(); v 的类型是____。 A: int B: unsigned int C: long D: unsigned long
- 有下面语句:auto a = 2u; auto b = -3; auto c = a * b; c 的类型是: A: unsigned int B: int C: long D: 语法错误
- 有下面语句:auto a = 2u; auto b = 3l(小写字母l);decltype(a*b) c; c 的类型是: A: unsigned int B: int C: long D: unsigned long
- 有下面语句:auto<br/>a=2u;autob=3l(小写字母l);decltype(a*b)c;c的类型是<br/>____。 A: unsigned<br/>int B: int C: long D: unsigned<br/>long
- 下面哪一个变量类型为unsigned long long? A: auto v1 = 123; B: auto v2 = 123u; C: auto v3 = 123lu; D: auto v4 = 123llu;