Answered step by step
Verified Expert Solution
Question
1 Approved Answer
QUESTION 1 You are given the following struct kid and an array of struct kids for a nursery school. You use it for storing kid's
QUESTION 1 You are given the following struct kid and an array of struct kids for a nursery school. You use it for storing kid's information The figure on the right shows an example where four kids information has been stored in the array. kids define asize 100 typedef enum Bale -o, fenale } gender; struct kid ( char nane (16] gender genderValue nt 8 struct kid kids[asize I array of structs nt tail- tail All the write-in questions are related to each other and are based on the code given above. Assume that you have al the helper code needed to make the program running Answer the following questions. 1.1 How many padding bits are required for the struct kio? .2 which statement wil correct y 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 a struct kidNode based on struct kid, so that kidNode can be used for forming a linked list, what member needs to be added into lkidNode? 1.5 What is the total size in Byces) of the array kids? QUESTION 3 Write a recursive function void displayAkidNode "p The function prints the name and gender (male or female) of every You must give the complete C code of the recursive function void displayA(kidNode pl. The first line of code is given node stored in the linked list if the liniked list is not empty. You can assume that p hesd; will be performed before calling this funetion QUESTION 4 Based on the Fantastic Four Step abstract approach of recursive programming answer the following questions: 4.1 What is the size-n problem? 4.2 What is the stopping condition? 4.3 What is the size-m problem? 4 Explain how enum type of value male and female can be printed
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started