I have two functions. I have 2 arrays in int main. Now I need to pass both arrays individually to these two functions. Everything is fine with the first function. On the second function, I am calling the first function within this function. My question is, what do I put in the spot, marked "/*here*/"? The matrices are a and b. I need to let it use whatever array was passed to the function, so I dont know what to put there, or what else can I do?
I probably didnt explain it well, so let me know if I need to do more explaining. Thanks for help.
Code:
int setCardinality(int a[]){
int i;
int numberElements=1;
for(i=1;a[i]!=-1;i++){
numberElements++;
}
return (numberElements);
}
void printSet(int a[]){
int setCardinality(int a[]);
int j;
for(j=0;j<setCardinality(/*here*/);j++){
printf("%d,", a[j]);
}
printf("}\n");
}