Question: ListyString *destroyListyString(ListyString *listy); Description: Free any dynamically allocated memory associated with the ListyString and return NULL. Be sure to avoid segmentation faults in the event

ListyString *destroyListyString(ListyString *listy); Description: Free any dynamically allocated memory associated with the ListyString and return NULL. Be sure to avoid segmentation faults in the event that listy or listy->head are NULL. Returns: NULL.

Inside H file:

#ifndef __LISTY_STRING_H

#define __LISTY_STRING_H

typedef struct ListyNode

{

char data;

struct ListyNode *next;

} ListyNode;

typedef struct ListyString

{

ListyNode *head;

int length;

} ListyString;

ListyString *destroyListyString(ListyString *listy);

#endif

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!