Question: QUESTION 1 You are given the following struct kid and an array of struct kids for a nursery school. You use it for storing The

 QUESTION 1 You are given the following struct kid and an

QUESTION 1 You are given the following struct kid and an array of struct kids for a nursery school. You use it for storing The figure on the right shows an example where four kids information has been stored in the array. Mar female kids #define asize 100 typedef enum male e, female gender struct kidf Max male char nane [16]; sender genderValue; int age Seth struct kid kids[asize nt tail- II array of structs Moll Eemale tail All the write-in questions are related to each other and are based on the code given above. Assume that you have all the helper code needed to make the program running. Answer the following questions 1.1 How many padding bits are required for the struct kid? 1.2 Which statement will correctly input the name into the struct array kids? 1.3 Which instruction will correctly input the age into the struct array kids? 1.4 If you want to define struct kidNode based on struct kid, so that kidNode can be used for forming a linked list, what member needs to be added into kidNode? 1.5 What is the total size (in Bytes) of the array kids? QUESTION 2 9 points The structure def nition of this question is based on the previous question. You want to write a function void fromArrayTolinkedLis) to move (copy) all the data in the kids array into the linked list consisting of kidNade strucs. The linked is painted to by the pointer head. You can simply insert the new node into the first place of the linked list, as shown in the example in the following diagram You must use a loop to read each element of data stored in the array from the beginning to the tail and insert the data into the linked list one by one head fers tal The first part of the code is given as follows // In the tunction, you can access tail to the array and head to the linked 11st void frc ArrayoLinkedList

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!