试题与答案

--- Did you get a ticket? --- No, ______

题型:选择题

题目:

--- Did you get a ticket?

--- No, ______, but there wasn’t any left.

A.I tried

B.I tried to

C.I try

D.I try to

答案:

答案:B

考查时态及省略,根据上句的时态可知答语也应用过去式,可排除C和D,短语:试着做某事try to do,应省略到to,所以选B。

试题推荐
题型:问答题

请补充函数fun(),该函数的功能是:只保留字符串中的大写字母,删除其他字符,结果仍保存在原来的字符串中,由全局变量m对删除后字符串的长度进行保存。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。
试题程序:
#include<stdio.h>
#include<conio.h>
int m;
void fun(char*s)

int i=0,j=0;
char *p=s;
while(*(p+i))

if(*(p+i)>=’A’&&*(p+i)<=’Z’)

(1)

(2)

s[j]=’\0’;
(3)

main()

char str[80];
clrscr();
printf("\nEnter a string:");
gets(str);
printf("\n\nThe string is:\%s\n",str);
fun(str);
printf("\n\nThe string of changing is: \%s\n",str);
printf("\n\nThe length of changed strtng is:\%d\n",m);

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