Question: C Programming: Define a basic Profile structure for a school by using C programming . Use the keyword typedef in the declaration of the structure

C Programming:

Define a basic Profile structure for a school by using C programming. Use the keyword typedef in the declaration of the structure for simplicity. The structures members should include the student's name (e.g, Jane Doe), students ID (e.g., 10001), gender (a letter M or F), month of birth (1~12), day of birth (1~31), and year of birth (1900~2020). This structure must contain a member variable that is a pointer to the structure type itself.

Tasks:

  1. In the main() function, declare a pointer to the Profile structure type, and initialize this pointer using the malloc() function in the C standard library. Declare other variables if needed
  2. Have the first function that prompts for the students name, and receives the data and uses it to set the corresponding member of the Profile structure created in step 1 through a pointer
  3. A second function prompts for the students gender, and receives the data and uses it to set the corresponding member of the Profile structure created in step 1 through a pointer
  4. Third function prompts for the students ID, and receives the data and uses it to set the corresponding member of the Profile structure created in step 1 through a pointer
  5. Fourth function that prompts for the patients date of birth, receives the month of birth (1~12), day of birth (1~31), and year of birth (2019) in pointer parameters. The return type of this function must be void.
  6. All the above functions should be called at least once in the main() function. At the end of the main() function, prints all the information of a student by using the pointer to the Profile structure type (created in step 1)

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!