subject

Define a function SetBirth, with int parameters monthVal and dayVal, that returns a struct of type BirthMonthDay. The function should assign BirthMonthDay's data member month with monthVal and day with dayVal.

#include

typedef struct BirthMonthDay_struct {
int month;
int day;
} BirthMonthDay;

/* Your solution goes here */

int main(void) {
BirthMonthDay studentBirthday;
int month;
int day;

scanf("%d %d", &month, &day);
studentBirthday = SetBirth(month, day);
printf("The student was born on %d/%d.\n", studentBirthday. month, studentBirthday. day);

return 0;
}

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 19:10
10. when you create a pivottable, you need to specify where to find the data for the pivottable. is it true
Answers: 2
question
Computers and Technology, 23.06.2019 12:00
If you embed a word table into powerpoint, what happens when you make edits to the embedded data? a. edits made to embedded data change the data in the source file; however, edits made to the source file will not be reflected in the embedded data. b. edits made to embedded data will change the data in the source file, and edits made to the source file will be reflected in the embedded data. c. edits made to embedded data don't change the data in the source file, nor will edits made to the source file be reflected in the embedded data. d. edits made to embedded data don't change the data in the source file; however, edits made to the source file will be reflected in the embedded data.
Answers: 1
question
Computers and Technology, 24.06.2019 02:00
How are we able to create photographs differently than 100 years ago? explain your answer in relation to your photograph you selected.
Answers: 1
question
Computers and Technology, 24.06.2019 11:30
Convert 11001110(acdd notation) into decimal
Answers: 2
You know the right answer?
Define a function SetBirth, with int parameters monthVal and dayVal, that returns a struct of type B...
Questions
question
Social Studies, 07.05.2021 14:00
question
English, 07.05.2021 14:00
question
Computers and Technology, 07.05.2021 14:00
question
Physics, 07.05.2021 14:00
question
Physics, 07.05.2021 14:00
Questions on the website: 13722362