Pass a char pointer array to a function in C?
===

I have the following code:

    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;
    }


I'm trying to pass char and char pointer array to a function, but the above code results in error.... so I'm trying to understand the problem is. Any help would be great.

Thanks.