皮皮学,免费搜题
登录
搜题
【简答题】
假定输入的字符串中只包含字母和*号。请编写函数 fun(),它的功能是:除了尾部的,:号之外,将字符串中其他*号全部删除。形参p已指向字符串中最后一个字母。在编写函数时,不得使用C语言的字符串函数。 例如,若字符串中的内容为****A*BC*DEF*G******,删除后,字符串中的内容应当是ABCDEFG******。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun的花括号中填入所编写的若干语句。 试题程序: include<conio. h> include<stdio. h> void fun(char *a, char *p) { } main ( ) char s[81],*t; printf ('Enter a string: /n '); gets (s); t=s; while (*t) t++; t--; /*指针t指向字符串尾部* / while (*t== '*' ) t--; /*指针t指向最后一个字母*/ fun (s, t); printf ('The string after deleted: /n'); puts (s); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】成人宫体与宫颈之比 ()
A.
2:1
B.
3:1
C.
1:1
D.
1:2
E.
2:3
【判断题】甘油和葡萄糖热分解的 Grob反应机理涉及葡萄糖分子内羟基直接的氢键作用,通过协同电子迁移,分解得到水和两分子的醛类产物。该反应机理能够在低活化能的情况下有效地断开不同位置的C—C键。
A.
正确
B.
错误
【单选题】Madonna and Michael Jackson are not considered heroes because________
A.
they are popular only among certain groups of people
B.
their performances do not improve their fans morally
C.
their primary concern is their own financial interests
D.
they are not clear about the principles they should follow
【单选题】《孙子兵法》( The Art of War )是我国古代著名的军事家( strategist )孙武的著作。
A.
The Art of War was written by Sun Wu, a famous ancient Chinese strategist.
B.
The Art of War was the work of Sun Wu, a famous ancient Chinese strategist.
【单选题】From: Pedro Salazar (p.salazar@vinewood.com) To: Michael Friedman (michaelfriedman@warnerharrison.com) Subject: Contract Change Date: September 3,1:48 p.m. Mr. Friedman, I got your message (147) the c...
A.
regard
B.
regards
C.
regarded
D.
regarding
【单选题】The strategist's challenge is to...
A.
Determine the most effective marketing plan for an organization.
B.
Build bridges between operations and outside investors.
C.
Balance workload with other commitments.
D.
Identify valuable competitive positions at the intersection of values, capabilities, and opportunities.
【简答题】n Be an armchair strategist
【判断题】偏极继电器主要是鉴定电源极性 ,一般用于道岔表示电路和半自动闭塞线路继电器电路中。
A.
正确
B.
错误
【简答题】This | Those Dave: What is the problem, Michael? Michael: ( ) office is a mess.
【判断题】Strategist Michael Porter identified three generic strategies that can be pursued by an organization, namely, cost leadership, differentiation, and value enhancement.
A.
正确
B.
错误
相关题目: