将char指针数组传递给C中的函数?

我有以下代码:

int main(){ char **array; char a[5]; int n = 5; array = malloc(n *sizeof *array); /*Some code to assign array values*/ test(a, array); return 0; } int test(char s1, char **s2){ if(strcmp(s1, s2[0]) != 0) return 1; return 0; } 

我正在尝试将char和char指针数组传递给函数,但上面的代码会导致以下错误和警告:

  temp.c:在函数'main'中:
 temp.c:6:5:警告:隐式声明函数'malloc'[-Wimplicit-function-declaration]
 temp.c:6:13:警告:内置函数'malloc'的不兼容隐式声明[默认启用]
 temp.c:10:5:警告:隐式声明函数'test'[-Wimplicit-function-declaration]
 temp.c:顶级:
 temp.c:15:5:错误:'test'的冲突类型
 temp.c:15:1:注意:具有默认促销的参数类型不能与空参数名称列表声明匹配
 temp.c:10:5:注意:先前的'test'隐式声明就在这里
 temp.c:在函数'test'中:
 temp.c:16:5:警告:隐式声明函数'strcmp'[-Wimplicit-function-declaration] 

我试图了解问题所在。