解题思路:
注意事项:
参考代码:
#include<stdio.h>
#include<string.h>
void function_1(char *a,char *b,int len_1);//函數聲明
int main(void)
{
char get[100];//定義字符數組
char get_1[100];//定義字符數組
int len_0=0;//記錄錄入長度
int i,c;
while((c=getchar())!='\n'&&c!=EOF){
get[len_0++]=c;
}//逐個讀入輸入的字符
function_1(get,get_1,len_0);//函數調用
for(i=0;i<len_0;i++){
printf("%c",get_1[i]);
}//遍歷輸出
return 0;
}
void function_1(char *a,char *b,int len_1)//數組就是特殊的指針
{
int i;
for(i=0;i<len_1;i++){
b[len_1-1-i]=a[i];//注意存放位置
}
}
0.0分
1 人评分
妹子杀手的故事 (C语言代码)浏览:690 |
C语言程序设计教程(第三版)课后习题5.4 (C语言代码)浏览:900 |
A+B for Input-Output Practice (III) (C语言代码)浏览:576 |
C语言训练-大、小写问题 (C语言代码)浏览:732 |
IP判断 (C语言描述,蓝桥杯)浏览:1095 |
1011题解浏览:765 |
1013题解浏览:560 |
C语言程序设计教程(第三版)课后习题10.1 (C语言代码)浏览:535 |
GC的苦恼 (C语言代码)浏览:621 |
C二级辅导-统计字符 (C语言代码)浏览:647 |