Question: Can someone please help me with my code. I was working on the exercises and got stuck on exercise 4. I am using C programming
Can someone please help me with my code. I was working on the exercises and got stuck on exercise 4. I am using C programming in Xcode. I have attached the exercise questions and screenshots of what I have so far as well as the errors that pop up.






Lesson 6. Complex Data Types Lab Session 9. Structures (l) The main objective of this practical lab session and the following ones is to develop a C program to manage a database in which it is stored the information of different drones. it is very important to store a copy of the solution of each exercise, given that in most of the cases, the implemented code will be used to solve the following exercises. Exercise 1. Definition of the typeDrone structure. Definition and use of simple structures. To identify a drone it is required: its identification number (integer value), model string purchase price (in euros), height at which it can fly (in meters), flight autonomy (-int- in minutes) and maximum weight it can transport (-int- in Kilograms) Write a C program to: a) Define a structure (a struct) named typeDrone that allows to store the information of a dron b) Declare and initialize a typeDrone variable, asking the user to enter the required information. c) Print the data of the drone on the screen Exercise 2. Film Producers: Using a structure as a field of another structure Modify the typeDrone structure to also include the last date in which it was inspected (day, month, and year). The date must be modelled by means of a structure that stores the integer fields day, month and year. To do this, define a new structure type named dateType and include this structure as a field of the typeDrone type Then, define a function readDataDrone with the following prototype: struct typeDrone readDataDrone (void) This function will ask the user to enter the complete information of a drone (including the information corresponding to the inspection date). Verify the correct operation of this function designing a program that defines a typeDrone variable, calls the readDataDrone function to assign the values of a drone to this variable, prints all the fields of the structure. To do this, you must develop the showDataDrone function: void showDataDrone (struct type Drone drone) This function receives a typeDrone variable as an input parameter (call by value) and prints the values of all its fields (identifier, model, purchase price, height at which it can fly, flight autonomy, maximum weight it can transport, and date of the last inspection)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
