Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

[ 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
image text in transcribed

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PostgreSQL 10 High Performance Expert Techniques For Query Optimization High Availability And Efficient Database Maintenance

Authors: Ibrar Ahmed ,Gregory Smith ,Enrico Pirozzi

3rd Edition

1788474481, 978-1788474481

More Books

Students also viewed these Databases questions