谢谢ldsh304
  marlow
  炎天
  九转星河
  client苏
你们给的代码我都好好看了
int main()
{
    char str2[30][31];
    char temp;
    int len;
    int i=0;
    int j=0;
    while(gets(str2[i])!=NULL)
           //取一行的字符串
    {
        len=strlen(str2[i]);
        for(j=0; j<len/2; j++)
                      //将首尾互换
        {
                                           //
             temp = str2[i][j];
                     //
             str2[i][j] = str2[i][len-1-j];
         //
             str2[i][len-1-j] = temp;
               //
        }
        i++;
                                        //下一行
    }
    for(j=i-1;j>=0;j--)
                             //以ctrl+c结束
    {
        printf("%s\n",str2[j]);
                     //输出逆反后的数组
    }
    return 0;
}
-----------------------------------------------分割线-------------------------1
char ch[31];
while ((gets(ch)) != null)
         //取一行的字符串
{
    int len = strlen(ch);
          //strlen(ch)取字符串长度(到'\0'结束
    for (int i = 0; i <= len/2; i++)//将数组逆反
    {
        char temp = ch[i];
        ch[i] = ch[len-i-1];
        ch[count-i-1] = temp;
    }
}
-----------------------------------------------分割线-------------------------2
#include <stdio.h>
#include <string.h>
#define MAXLINE 30
int main(void)
{
    char ch[MAXLINE];
    int n;
    while(gets(ch) != NULL)
   //读取字符串 
    {
        n = strlen(ch);
   
        for(; n > 0; n--)
            printf("%c", ch[n - 1]);
    //逆反输出
    }
    return 0;
这是我的理解
但是
#include<stdio.h>
void fun()
{
    char ch;
    if (scanf("%c",&ch)!=EOF)
        fun();
    if (ch!='\0')
        printf("%c",ch);
}
int main()
{
    fun();
    printf("\n");
    return 0;
}这个代码的将数组反输出在哪?
(指针还没学,我以后在回过来看)