Let's say I have the following function where I don't care about the tmp buffer required as an argument and only need the function's return value. For example:
char tmp[20];
printf("Using my function for case 1: %s", printstr(28, tmp));
Is the following an acceptable way to do the above?
printf("Using my function for case 1: %s",
printstr(28, (char[20]){0})
);
Is that an acceptable approach? Or are there any downsides of using that approach?