Write a linked-list program using program 12.3 studied in class, in which the listNode structure is replaced with the members of the PET structure from program problem 12.1. Show in the output screenshot(s) the addition of the four pet records and the deletion of the cat record from the linked list. Hint: Use for the get name function strcmp() to determine where to insert the new pet in the linked list.

COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
1st Edition
ISBN:9780357392676
Author:FREUND, Steven
Publisher:FREUND, Steven
Chapter9: Formula Auditing, Data Validation, And Complex Problem Solving
Section: Chapter Questions
Problem 6EYK
icon
Related questions
Question

in c lanaguage only please. i only need help with 12.2. and please make sure it includes the addition of 4 new pet records and the deletion of the cat record.

thank you again
COP-2270 Lab 12

Write C programs for the problems below. Make sure to include in the file the source code in text and the program output as screenshot of. Then, submit this file to Blackboard by the due date.

Exercise

Lab12.1

Write a program called mypets in which uses a typedef structure called PET defined as follow. PET data contains three members; the type of pet, the name of the pet, and its age. You should use in the program dynamic memory allocation, that you learned this week to create an array of PET objects. The pet information is entered by the user, and stored in a PET array as shown below. Finally, the program should output the pet information from the PET array. Make sure the program frees all memory before exiting.

Type

Name

Age

Dog

Terry

Taby

Cat

5 10

Parrot

Rabbit

Douglas

Bunker

30

2

Lab12.2

Write a linked-list program using program 12.3 studied in class, in which the listNode structure is replaced with the members of the PET structure from program problem 12.1. Show in the output screenshot(s) the addition of the four pet records and the deletion of the cat record from the linked list.

Hint: Use for the get name function strcmp() to determine where to insert the new pet in the linked list. 

Expert Solution
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 3 steps

Blurred answer
Knowledge Booster
Structure
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L