I'm trying to pass an array of char * defined with braces and with static strings, and I want to pass it as an argument to a function.
The array is the next:
char * phrase[] = {"my", "name", "is", "John"};
and the function which is going to receive the argument is implemented as follows:
void composeList(char * phrase[]){
//I'm getting the size of the list
int phrase_list_size = sizeof(*phrase)/sizeof(phrase[0]);
printf("%d\n",phrase_list_size);
}
I call that function in this way:
composeList(phrase);
But when I print the size the value is 1 instead of 4. Could you help me?