试题与答案

阅读下面程序,则执行后的结果是 #include"stdio.h" main()

题型:单项选择题

题目:

阅读下面程序,则执行后的结果是 #include"stdio.h" main() { char str[]="tomeetme",*p; for(p=str;p<str+7;p+=2)putchar(*p); printf("\n");} .

A.tomeetme

B.tmem

C.oete

D.tome

答案:

参考答案:B

解析: 存放字符串的字符数组的名字就是这个字符串的首地址。本题的功能是对于字符串“tomeetme”进行选择式输出,从第一个字母开始,每输出一个字符即跳过一个。

试题推荐
题型:阅读理解

阅读短文,回答问题。

     What time can you have breakfast? Breakfast is very important and you must eat it. People eat

breakfast in one or two hours after they get up. It's good to eat breakfast before nine o'clock.. Some

people don't eat anything in the morning. Some are very busy. Others want to be thin. But both (两个

都) reasons are bad. It's difficult to work or study well without breakfast, and it can't help one get thin.

In fact, if one doesn't eat breakfast, it may even make one fat. In the morning, you must eat some good

food. You can eat some eggs, some bread and drink some milk. You can eat some chicken as well. If

you get up late after nine o'clock, you still must eat breakfast. You can eat it in one or two hours after

you get up.

1. When can people have breakfast?

________________________________________________________

2. Why don't some people eat breakfast?

________________________________________________________

3. Can one get thin by not eating breakfast?

________________________________________________________

4. When can one eat breakfast if he gets up late?

________________________________________________________

5. What can one eat for breakfast?

________________________________________________________

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