引用传递中的二维数组传递的是地址还是实参?如果传递的是地址还需要将调用函数中的数组返回吗?

 ###### 问题遇到的现象和发生背景

创建用户库strpro.h和openfile.h,其中strpro.h中包含getString、sort和read函数,而openfile.h中包含openw函数。
在main函数中提示用户输入一句英文句子,要求:

  1. 调用getString函数将该英文句子读入二维字符数组,然后调用函数sort,利用选择或冒泡算法对上述句子中的单词进行排序(按字母序)。
  2. 将排好序的句子写入到磁盘文件data.txt中。要求打开data.txt文件的操作须调用openw函数完成,打开时须检查同名文件是否存在,并提示用户是否覆盖原文件。
  3. 调用函数read将data.txt中的内容读回显示到屏幕上。

 ###### 问题相关代码,请勿粘贴截图

#include <stdio.h> 
#include "strpro.h"

int main()
{    

    
    char word[15][15];
    
    getString (word);
    sort (word);
    print(word);
    
    return 0;
}

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

void print(char word[][15])
{
    int i;
    
    for (i=0;i<15;i++)
    {
        printf("%s",word[i][15]);
    }
}



//Here, we are reading the data.
void getString(char word[][15])
{
    printf("\nPlease input an English sentence: \n");
        
    char c;
    int i=0,j=0;
    
    do 
    {
        scanf("%c",&word[i][j]);
        
        if ( word[i][j] == ' ')
        {
            word[i][j] = '\0';                               //It means a word.
            i++;
            j = 0;
        }
        
        else if ( word[i][j] == '\n' || word[i][j] == '.')   //The entering is end.
        {
            word[i][j] = '\0';
            break;
        }
        
        else if (isalpha(word[i][j]))
        {
            j++;
        }
    } while (1);
    putchar('c');
}

//Here is the Buddle.
int sort(char word[][15])
{
    int a,b;
    char temp;
    
    for (a=14;a>0;a--)
    {
        for (b=0;b<15;b++)
        {
            if (strcmp(word[b][15],word[b+1][15]))
            {

                temp          = word[b][15];
                word[b][15]   = word[b+1][15];
                word[b+1][15] = temp;
            }
        }
    }
    return 0;
}

void read()
{
    
}

 ###### 运行结果及报错内容

img


通过了编译,但是程序无法正常运行,MAYDAY!

char array[10][10]
array[m][n]代表的是字符,而不是字符串

我写的程序真是错漏百出唉,又发现了字符串的赋值应该用strcpy