Question: [ 1 0 points ] Write a C function named time 1 ( ) that accepts integer number of seconds and the address of three

[10 points] Write a C function named time1() that accepts integer number of seconds and the address of three variables named hours, min, and sec. The function is to convert the passed number of seconds into an equivalent number of hours, minutes, and seconds and directly alter the value of respective variables using their passed addresses. The function should use the following prototype:
void time1(int total_sec, int* hours, int* min, int *sec);
[3 points] Replace the following references to a subscript variable (i.e. array) with a pointer reference. For example, prices [5] should be replaced with *(prices +5).
a. grades 2
b. yield[5];
c. mile 0;
[3 points] Replace the following references using a pointer with a subscript reference.
For example, *(prices +5) should be replaced with prices [5].
a.*(message +6)
b.*(code +19)
c.*amount
 [10 points] Write a C function named time1() that accepts integer

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!