#include<stdio.h>
char dao(char in[]);
main()
{
char in[]=getchar();/*--初始化有问题--*/
printf("%s",dao(char in[]));/*--返回值问题--*/
}
char dao(char in[])
{
int i,j,c,max;
char out[];/*----*/
while((c=getchar())!=EOF){
for(i=0;c!='\n';++i)
max=i;
for(j=0;j<=max;++j)
out[j]=in[max--];
out[++j]='\0';}
return out[];/*--不能直接返回数组--*/
}
#include<stdio.h>
#include<string.h>
#define MAX 100
void dao(char* in);
int main(int argc , char *argv[])
{
char *str = "helloworld";
dao(str);
}
void dao(char* in)
{
char out[MAX];
int i = 0,j = strlen(in) - 1;
while (j >= 0)
out[i++] = in[j--];
out[i] = '\0';
printf("%s\n",&out);
return;
}