Convert arguments before calculating ticks

A C17 timer helper produces four ticks per complete second. Its definition appears before the caller:


C
int ticks(int seconds)
{
    return seconds * 4;
}


Inside a valid caller, the program executes:


C
int total = ticks(3.75) + ticks(2.25);


What value is stored in total? Answer in ticks as an exact integer, to zero decimal places.

Create a free account to get started

Unlock full course notes by signing up

  • Video lessons taught by top educators
  • Practice questions with guided solutions
  • Written review notes for reference
  • Expert answers anytime from course tutors

More Functions and Void Return Types Questions: