subject

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: o Read the information (last name, first name, age ) for a single person Store that information in a person instance allocated from the heap. o Append that instance to the array argument o 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. Q2 Place the readPeople function in your labsheet, with formatting. Consider Vim's :r (read) command, or use Bash redirect/append. 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. Q3 Place the freePeople function in your labsheet, with formatting. Consider Vim's : r (read) command, or use Bash redirect/append.

ansver
Answers: 2

Other questions on the subject: Computers and Technology

image
Computers and Technology, 22.06.2019 07:00, ayoismeisalex
Our primary purpouse as electricians is to do wich of the following core concepts? a: install electrical components in a way they can be upgraded b: install electrical equiptment in a way that reduces heat c: install electrical systems in a safe manner d: only b and c
Answers: 1
image
Computers and Technology, 22.06.2019 22:30, jacob7542
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
image
Computers and Technology, 23.06.2019 06:20, Ab20600
Which text function capitalizes the first letter in a string of text? question 10 options: upper capital first proper
Answers: 1
image
Computers and Technology, 23.06.2019 07:00, bskyeb14579
Why is investing in a mutual fund less risky than investing in a particular company's stock? a. mutual funds only invest in blue-chip stocks. b. investments in mutual funds are more liquid. c. mutual funds hold a diversified portfolio of stocks. d. investments in mutual funds offer a higher rate of return.
Answers: 2
You know the right answer?
Copy the file readPeople. c. The main function should be in fine shape. You need to finish the funct...

Questions in other subjects:

Konu
Mathematics, 03.12.2020 18:10