怎么编写程序题目?
题目:编一个函数,连接两个字符串,输出连接后的字符串,怎么编写程序
#include void main() { void con(char sting1[],char sting2[],char sting3[]); char s1[20],s2[20],s3[40]; printf("Input sting1: "); scanf("%s",s1); printf("Input sting2: "); scanf("%s",s2); con(s1,s2,s3); printf("%s\n",s3); } void con(char sting1[],char sting2[],char sting3[]) { int i,j; for(i=0;sting1[i]!='\0';i++)//////////////////////////多个分号 sting3[i]=sting1[i]; for(j=0;sting2[j]!='\0';j++)//////////////////////////多个分号 sting3[i+j]=sting2[j]; sting3[i+j]='\0'; } 如果能帮助到你,把我回答的问题设置为“好评”。
答:函数头我就不和你写了! int a[20],b[20],i=0,j=0; while(a[i]!='\0') { i++; } while(b[i]!='\0'...详情>>
答:的意思是找不到指定的文件,你确定你的文件路径正确吗? 另外,调用的部分你用 n(shcmd)试试详情>>