I have a function that returns a char *. I have another function that wants a char array as a parameter.
Will that work as expected?Code:char * func1() {
char *temp = malloc(sizeof(char) * 10);
strcpy(temp, "hello");
return temp;
}
void func2(char temp[10]) {
yadda yadda;
}
int main() {
printf("%s", func2(func1()));
}