Why is it possible to list variables of the same type together when defining variables in C language, but not to define parameters?

void print_time(int hour, minute)
{
    printf("%d:%d\n", hour, minute);
}

defining parameters of the same type will result in an error. Why does the C language specify this?

C
Nov.19,2021

should be in order to clearly express the specific meaning of each parameter and to prevent confusion. In the past, there was another way to write:

.
void print_time(int hour, minute, isHourStartFromZero)
{
    if (isHourStartFromZero) {
      printf("%d:%d\n", hour + 1, minute);
    } else {
      printf("%d:%d\n", hour, minute);
    }
}
Menu