1 2 3 4 5 6 7 8 9 10 11 12 13 14 | #include <iostream> using namespace std; unsigned short f(unsigned short x) { x ^= x << 6; x ^= x >> 8; return x; } int main() { unsigned short x; cin >> x; unsigned short y = f(x); cout << y << endl; return 0; } |
0 of 6 Questions completed
Questions:
You have already completed the quiz before. Hence you can not start it again.
Quiz is loading…
You must sign in or sign up to start the quiz.
You must first complete the following:
0 of 6 Questions answered correctly
Your time:
Time has elapsed
You have reached 0 of 0 point(s), (0)
Earned Point(s): 0 of 0, (0)
0 Essay(s) Pending (Possible Point(s): 0)
当输入非零时,输出一定不为零。()
2、将 f
函数的输入参数的类型改为 unsigned int
,程序的输出不变。()
3、当输入为 65535
时,输出为 63
。()
4、当输入为 1
时,输出为 64
。()
5、当输入为 512
时,输出为()。
当输入为 64
时,执行完第 4 行后 x
的值为()。