subject

Given the following struct definition: struct time
{
int hr ;
int min ;
int sec ;
}
, write a function,
struct time sec2hms( int secs )
which takes, as an argument, the number of seconds since midnight, and returns the time of day.
Copy the file readPeople. c. The main function should be in fine shape. You need to finish the function readPeople, and supply the freePeople function.
readPeople
Given a file handle and an array of null pointers:
Read the information (last name, first name, age ) for a single person
Store that information in a person instance allocated from the heap.
Append that instance to the array argument
Attempt to read another person
Here is a sample input file:
Smith
Granny
68
Tape
Scott
32
Wire
Barbara
45
You may assume:
Entries are complete. If there's a last name, then there's a first name and an age
Data is correct. Age will always convert to an integer.
freePeople
This function simply returns the heap instances pointed to by the array to the heap. Do not assume that the array is dense. Check every position for a non-NULL pointer.

ansver
Answers: 3

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 22:00
What must you do before formatting a paragraph?
Answers: 1
question
Computers and Technology, 23.06.2019 05:00
Acompany is inviting design for its new corporate logo from its users. this is an example of ? a. crowdfunding b. crowdvoting c. crowdsourced design d. crowdtracking
Answers: 3
question
Computers and Technology, 23.06.2019 06:00
Which statistical function in a spreadsheet you to see how far each number varies, on average, from the average value of the list?
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
From excel to powerpoint, you can copy and paste a. cell ranges and charts, one at a time. b. cell ranges and charts, simultaneously. c. charts only. d. cell ranges only.
Answers: 3
You know the right answer?
Given the following struct definition: struct time
{
int hr ;
int min ;
i...
Questions
question
Mathematics, 21.04.2020 19:38
question
Mathematics, 21.04.2020 19:38
Questions on the website: 13722363