1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Serjik [45]
4 years ago
3

Define a function SetBirth, with int parameters monthVal and dayVal, that returns a struct of type BirthMonthDay. The function s

hould 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;
}
Computers and Technology
1 answer:
Juliette [100K]4 years ago
3 0

Answer:

The method definition to this question can be described as follows:

Method definition:

BirthMonthDay SetBirth(int monthVal, int dayVal) //defining method SetBirth

{

BirthMonthDay type; //defining structure type variable  

type.month = monthVal; //holding value

type.day = dayVal;//holding value

return type; //retrun value

}

Explanation:

Definition of the method can be described as follows:

  • In the above method definition a structure type method "SetBirth" is defined, that accepts two integer parameter, that is "monthVal and dayVal". This method uses typedef for declaring the structure type method.
  • Inside the method, a structure type variable that is "type" is declared, which holds the method parameter value and uses the return keyword to return its value.
You might be interested in
How does segmenting your network increase network security?
lys-0071 [83]

Answer:

By segmenting networks, it becomes easier to protect the most sensitive data that you have on your internally-facing network assets. The creation of a layer of separation between servers containing sensitive data and everything outside of your network can do wonders to reduce your risk of data loss or theft.

Explanation:

PLEASE MARK ME AS BRAINLIEST

5 0
3 years ago
There are three required elements needed to connect to the internet: hardware, web browser, and __________.
malfutka [58]

Yes the answer is D.internet service.

7 0
3 years ago
Read 2 more answers
Create a single line comment that says ""Print results to screen""
levacccp [35]

Answer:

//""Print results to screen""

Explanation:

In c,c++,java,javascript // is used for the single line comment.

syntax:- // comment.

Whatever text that is followed after // is commented means this line will not get executed by the compiler.

Comments are used to explain the code to other person who is working on the code or trying to understand that code.

6 0
3 years ago
You have a large company, and it is important to your business that your employees' work is backed up regularly. Which network w
valkas [14]
Client server network as it has a powerful server which provides all the networks required on the network. Files are usually backed up regularly.

3 0
4 years ago
Read each of the following statements about Computer Science and explain why you think that statement is true.
larisa86 [58]

Answer:

sytaragadr

Explanation:

3 0
3 years ago
Other questions:
  • What is the name of the feature that can be enabled on slower-speed WAN links to prevent a large data transfer from affecting th
    10·1 answer
  • Create a new file that builds a shopping list from a user. There should be a input query that asks the user to list an item and
    11·1 answer
  • You are the network administrator for Slimjim, a peripheral device company. The network uses Linux, and you need information on
    10·1 answer
  • Describe conductors and insulators in terms of energy
    11·1 answer
  • who will follow me on tiktok and like all my videos? if you do ill give branlist and give u a shoutout and you can enter my big
    15·1 answer
  • How to make a Tip Calculator in code?
    12·1 answer
  • Select the correct answer.
    15·1 answer
  • Write a program that uses a custom function to return the cost of purchasing an item, possibly in multiple quantities. The item
    14·1 answer
  • Catastrophic injuries and illnesses account for two-thirds of total health care costs in the country of Gnut. The Gnuti governme
    15·1 answer
  • What are the values of a[k] and a[k+1] after code corresponding to the following pseudocode runs?
    9·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!