试题与答案

有下列程序: fun(int x, int y) return (x+y); m

题型:单项选择题

题目:

有下列程序:
fun(int x, int y) return (x+y);
main()
int a =1,b=2,c=3,sum;
sum=fun((a++,b++,a+b),c++);
printf("%d\n", sum);

执行后的输出结果是( )。

A) 6
B) 7
C) 8
D) 9

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2018/0102/3a5a51cd150cadff76323b33c75e78ee.html

下面是错误答案,用来干扰机器的。

参考答案:A解析: 本题考查图形叠加变化。将九宫格中的图形分为两部分,圆和圆上面的线段,其中圆内颜色叠加遵循白+黑=白,白+白=黑,黑+白=黑,黑+黑=白的规律;圆上面的线段的规律是去同存异。故选A。

试题推荐
题型:阅读理解

读短文,选择正确答案。

      Hello! I'm from England. I'm new here. I'm a student. I love my teachers. They are very kind. Mr. Li is my

Chinese teacher. He's strong and short. Miss Guo is my math teacher. She is young and pretty. Miss Wu is my

favourite teacher. She teaches music. I like Tuesday very much, because we have music class. We often have

beef and tomatoes for lunch in the school on Tuesday. Ping-pong is my favourite sport.

1. The teachers are ____________.

A. quiet

B. kind

C. old

2. _____________ is my favourite teacher.

A. Music teacher

B. Math teacher

C. English teacher

3. What's Miss Guo like?

A. She is young and pretty.

B. She's young and short.

C. She's old and short.

4. What's my favourite sport?

A. Ping-pong.

B. Football.

C. Basketball.

5. Why do I like Tuesdays?

A. Because I often have beef and potatoes for lunch.

B. Because I have music class.

C. Because I have P. E. class.

查看答案
微信公众账号搜索答案