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.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
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
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education