试题与答案

规定输入的字符串中只包含字母和*号。编写函数fun,其功能是:除了字符串前导和尾部的

题型:多项选择题

题目:

规定输入的字符串中只包含字母和*号。编写函数fun,其功能是:除了字符串前导和尾部的*号外,将串中其他的*号全部删除。形参h已指向字符串中第一个字母,形参p指向字符串中最后一个字母。在编写函数时,不得使用C语言提供的字符串函数。
注意:部分源程序给出如下。
请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入你编写的若干语句。
试题程序:
#include<stdio.h>
void fun(char *a, char *h, char *p)


main()

char s[81], *t, *f;
printf("Enter a string:\n");
gets(s);
t=f=s;
while(*t)
t++;
t--;
while(*t==’*’)
t--;
while(*f-=’*’)
f++; fun(s, f, t);
printf("The string after deleted:\n");
puts(s);

答案:

被转码了,请点击底部 “查看原文 ” 或访问 https://www.tikuol.com/2017/0705/201c40e9806a160a96a8ddf7f2e4a0c3.html

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

参考答案:B解析: 《期货公司风险监管指标管理试行办法》第十八条第五项规定,期货公司的流动资产与流动负债的比例不得低于100%。第二十三条规定,中国证监会对第十八条至第二十一条规定的风险监管指标设置预警...

试题推荐
题型:句型转换

根据所给提示,完成句型转换。每空一词,含缩略词。

1. The policeman didn't find anything in her bedroom. (改为同义句)

    The policeman ________ ________ in her bedroom.

2. The present is wonderful. (改为感叹句)

    ________ ________ the present is!

3. The girl asked Peter, "Are the stones real?" (改为宾语从句)

    The girl asked Peter _________ the stones _________ real.

4. Mr Brown has lived in London for ten years. (就划线部分提问)

    ________ ________ ________ Mr Brown lived in London?

5. You can ride a bike there. (改为反意疑问句)

    You can ride a bike there, _________ you?

6. They built a new school in our town last year. (改为被动语态)

    A new school _________ _________ in our town last year.

7. Did you wear the school clothes a lot? (改为被动语态)

    _________ the school clothes _________ a lot?

8. He found it was important to study English. (改为同义句)

    He found _________ _________ to study English.

9. She left her hometown eight years ago. (改为同义句)

    She has ________ ________ from her hometown for eight years.

10. I like to go out to play, and don't like to stay at home. (改为同义句)

      I prefer to play outside ________ ________ stay at home.

查看答案
题型:问答题

秦某为一机械厂职工,近来因工作屡屡出现差错,被其领导章某批评。秦怀恨在心,产生了报复杀人的念头。秦通过各种渠道买来雷管和烈性炸药,夜晚来到章居住的住宅楼下,填埋好炸药后,点燃了雷管的导火索,秦正要离开时,想到一栋楼的居民都会或死或伤,自己被抓后有可能被判死刑,突然感到害怕,急忙返回弄熄了导火索。 问:秦的行为构成何罪,处于何种犯罪形态说明理由。

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