Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Icdt 88 2nd International Conference On Database Theory Bruges Belgium August 31 September 2 1988 Proceedings Lncs 326

Authors: Marc Gyssens ,Jan Paredaens ,Dirk Van Gucht

1st Edition

3540501711, 978-3540501718

Students also viewed these Databases questions

Question

define the term outplacement

Answered: 1 week ago

Question

describe the services that an outplacement consultancy may provide.

Answered: 1 week ago