解题思路:
注意事项:一定要细心!
参考代码:
#include <stdio.h>
#include <string.h>
int test(char a[],char b[]);
int main()
{
char name1[40],name2[40];
gets(name1);
test(name1,name2);
printf("%s\n",name2);
return 0;
}
int test(char a[],char b[])
{
int length = strlen(a);
int i=0;
while(a[i]!='\0')
{
b[length-i-1]=a[i];
i++;
}
b[length]='\0';
return 0;
}
0.0分
0 人评分
C语言程序设计教程(第三版)课后习题10.4 (C语言代码)浏览:586 |
校门外的树 (C语言代码)浏览:1114 |
C语言程序设计教程(第三版)课后习题8.2 (Java代码)浏览:2269 |
【亲和数】 (C语言代码)浏览:539 |
简单的a+b (C语言代码)浏览:528 |
母牛的故事 (C语言代码)浏览:920 |
C语言训练-求PI* (C语言代码)浏览:613 |
WU-输出九九乘法表 (C++代码)浏览:1665 |
C语言训练-自由落体问题 (C语言代码)浏览:611 |
矩阵乘方 (C语言代码)浏览:1022 |