Question: 1. Answer this question using the code given below. You are given a struct (lines 712), definition of createBug (lines 62-72), printOneBug (lines 7480), addTail

1. Answer this question using the code given below. You are given a struct (lines 712), definition of createBug (lines 62-72), printOneBug (lines 7480), addTail (lines 114129)

1. Answer this question using the code given below. You are given

(a) Using the struct and functions given in the code, what gets printed by the following code?

a struct (lines 712), definition of createBug (lines 62-72), printOneBug (lines 7480),

3031323334353637383940structbugptrTemp=NULL;structbugheadLL=NULL;ptrTemp=createBug();headLL=addTail(headLL,ptrTemp);ptrTemp=createBug();headLL=addTail(headLL,ptrTemp);printOneBug(headLL);printOneBug(headLL->ext); b. Write function definition for adding a bug at the front of the current list. Use the following prototype. It takes the current list and a new node, adds the new node to the front of the list. It returns the updated linked list. struct bug *addFront (struct bug * currentLL, struct bug* addMe); c. Write function definition for printing all bugs in the current list using the following prototype: void printBugs (struct bug * currentLL); d. Write function definition for printing all bugs in the current list using the following prototype: void killallBugs (struct bug currentLL)

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!