Answer:
The function in C is as follows:
int nexthour(int tme){
tme = tme%12 + 1;
return tme;
}
Step-by-step explanation:
This defines the function
int nexthour(int tme){
Ths calculates the next hour using % operator
tme = tme%12 + 1;
This returns the next hour
return tme;
}