![]() |
#2
yss282013-11-01 00:25
|
新人求教.. 谢谢帮助
倒置字符串..
为什么结果什么都没有输出
...
#include <stdio.h>
#include <string.h>
#define N 5
void fun(char s[], char t[])
{
int i=0;
int n=strlen(s);
while(i<=n)
{
t[i]=s[n-i];
i++;
}
}
int main(void)
{
char a[N],b[N];
gets(a);
fun(a,b);
puts(b);
}