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, 22.06.2019 06:50
Type the correct answer in the box. spell all words correctly. which view of report creation allows you to customize the report before the database program creates it? creating a report in allows you to customize the report before the database program creates it. pl asap
Answers: 1
question
Computers and Technology, 22.06.2019 07:30
An endless cycle of creation and response on the internet is called
Answers: 1
question
Computers and Technology, 22.06.2019 13:30
Asoftware company hired ray, a college graduate to work in their development team. ray is assigned to work in the coding phase of a project. what happens during the coding phase of a software development project? a. the customer receives a working model of the software. b. developers convert the program design into code. c. developers gather requirements directly from the stakeholders. d. testing teams check the product for quality.
Answers: 1
question
Computers and Technology, 22.06.2019 23:30
What is the digital revolution and how did it change society? what are the benefits of digital media?
Answers: 1
You know the right answer?
Given the following struct definition: struct time
{
int hr ;
int min ;
i...
Questions
question
Mathematics, 23.09.2019 18:30
Questions on the website: 13722361