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 11:20
The kurt vonnegut commencement speech, the neiman-marcus chocolate chip cookie recipe, and the get-well emails to the dying boy are examples of select one: a. social engineering b. hoax emails c. email viruses d. worms
Answers: 1
question
Computers and Technology, 22.06.2019 15:00
I'm taking a class on how to make a movie, and it offers some apps that would be in the process. the thing is, i don't have any of those ha. if you have any tips on some apps i could use, that would be awesome. i don't have an iphone, so don't suggest any apps like imovie. i know that this is a weird question, but it would be super for me. : )
Answers: 2
question
Computers and Technology, 23.06.2019 18:00
While inserting images, the picture command is usually used to insert photos from a digital camera, and the clip art command is usually used to a.edit the sizes and other characteristics of photos that have been inserted. b.take a screenshot of an image and copy it to the clipboard for pasting. c.search for drawings or other images from a library of prepared pictures. d.make illustrations using lines and shapes that are easy to manipulate.
Answers: 1
question
Computers and Technology, 23.06.2019 21:30
Write a fragment of code that reads in strings from standard input, until end-of-file and prints to standard output the largest value. you may assume there is at least one value. (cascading/streaming logic, basic string processing)
Answers: 3
You know the right answer?
Given the following struct definition: struct time
{
int hr ;
int min ;
i...
Questions
question
Mathematics, 22.10.2019 20:00
question
Mathematics, 22.10.2019 20:00
question
Social Studies, 22.10.2019 20:00
Questions on the website: 13722363