Open
Description
The following answer is only correct for C23.
Before C99, all four have been optional. Starting with C99, the parameter names and the number of parameters are still optional.
The following declaration declares the function with an unknown number of parameters (but without declaring a prototype):
int f();
With C23 this was changed to be equivalent to the following declaration:
int f(void);
In C17, for example, this is perfectly valid while it does not compile with C23:
int f();
int f(int x) { return x*2; }
See also: cppreference