Time will pierce the surface or youth, will be on the beauty of the ditch dug a shallow groove ;
Jane will eat rare!A born beauty, anything to escape his sickle sweep
.-- Shakespeare
模拟试题
(
一
)
1.
填空?/p>
请补充函?/p>
fun()
,该函数的功能是:把从主函数中输入的字符?/p>
str2
接在字符?/p>
str1
的后面?/p>
例如?/p>
str1=
?/p>
How do
?/p>
?/p>
str2=
?/p>
you do?
?/p>
,结果输出:
How do you do?
注意?/p>
部分源程序给出如下?/p>
请勿改动主函?/p>
main
和其他函数中的任何内容,仅在函数
fun
的横线上填入所?/p>
写的若干表达式或语句?/p>
试题程序?/p>
#include<stdio.h>
#include<conio.h>
#define N 40
void fun(char *str1,char *str2)
{
int i=0;
char *p1=str1;
char *p2=str2;
while(
?/p>
1
?/p>
)
i++;
for( ;
?/p>
2
?/p>
;i++)
*(p1+i)=
?/p>
3
?/p>
;
*(p1+i)='\0';
}
main()
{
char str1[N],str2[N];
clrscr();
printf("*****Input the string str1 &
str2*****\n");
printf(" \nstr1:");
gets(str1);
printf(" \nstr2:");