皮皮学,免费搜题
登录
搜题
【简答题】
请补充main函数,该函数的功能是:从键盘输入一个字符串并保存在字符str1中,把字符串str1中下标为偶数的字符保存在字符串str2中并输出。例如,当str1=“cdefghij”,则 str2=“cegi”。 注意:部分源程序给出如下。 请勿改动主函数main和其他函数中的任何内容,仅在函数fun()的横线上填入所编写的若干表达式或语句。 试题程序: include<stdio.h> include<conio.h> define LEN 80 main() { char str1[LEN],str2 [LEN]; char *p1=str1,*p2=str2; int i=0,j=0; clrscr(); printf('Enter the string:/n'); scanf(【 】); printf('***the origial string***/n'); while(*(p1+j)) { printf('【 】',*(p1+j)); j++; } for(i=0;i<j;i+=2) *p2++=*(str1+i); *p2='/0'; printf('/nThe new string is:%s/n', 【 】 ); }
拍照语音搜题,微信中搜索"皮皮学"使用
参考答案:
参考解析:
知识点:
.
..
皮皮学刷刷变学霸
举一反三
【单选题】光敏二极管工作时,应该( )
A.
加正向电压
B.
加反向电压
C.
不需加电压
D.
加正向、反向电压都可以
【单选题】描述一组正态或近似正态分布资料的平均水平用()
A.
算术均数
B.
几何均数
C.
中位数
D.
平均数
E.
百分位数
【单选题】描述一组正态或近似正态分布资料的平均水平用( )
A.
算术均数
B.
几何均数
C.
中位数
D.
平均数
E.
以上均是
【单选题】环烯醚萜苷元中,易与多种试剂产生反应的结构单元是:
A.
双键
B.
半缩醛
C.
糖取代基
D.
甲基
E.
羟基
【单选题】He always thinks of _______ he can do more for the people. A. what B. how C. if D. whatever 12. The monitor suggested that we ______ for a picnic on Sunday. A. wen...
A.
BDDA
B.
BDAD
C.
BDAC
D.
DBCA
【单选题】在我国种植面积和总产量都居第3位的是()。
A.
水稻
B.
玉米
C.
小麦
D.
油菜
【单选题】Many students were watching the story of the heroes from Changjiang University on TV, ________ mo
A.
27.Many students were watching the story of the heroes from Changjiang University on TV, ________ moved to tears. A.all of them
B.
all of whom
C.
all of that
D.
all of which
【判断题】荷兰首都是阿姆斯特丹。()
A.
正确
B.
错误
【判断题】光敏二极管用作光的测量时,应该工作在反向偏置状态。
A.
正确
B.
错误
【简答题】阿姆斯特朗登月乘坐的是什么号飞船?
相关题目: