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
Ivenika [448]
3 years ago
7

Define a function SetTime, with int parameters hoursVal and minutesVal, that returns a struct of type TimeHrMin. The function sh

ould assign TimeHrMin's data member hours with hoursVal and minutes with minutesVal.
Computers and Technology
1 answer:
Lapatulllka [165]3 years ago
4 0

Answer:

#include <stdio.h>

typedef struct TimeHrMin_struct //struct

{

int hours;

int minutes;

} TimeHrMin;

struct TimeHrMin_struct SetTime(int hoursVal,int minutesVal) //SetTime function

{

struct TimeHrMin_struct str;

str.hours=hoursVal; //assigning the values

str.minutes=minutesVal;

return str; //returning the struct

}

int main(void)

{

TimeHrMin studentLateness;

int hours;

int minutes;

scanf("%d %d", &hours, &minutes);

studentLateness = SetTime(hours, minutes); //calling the function

printf("The student is %d hours and %d minutes late.\n", studentLateness.hours, studentLateness.minutes);

return 0;

}

Explanation:

You might be interested in
Which changes the natural world? <br> technology <br> science <br> prototypes <br> feedback
Gelneren [198K]
It would be technology,
5 0
3 years ago
Which way do you swipe in ios to get to the control center
Korvikt [17]

Answer:

Swipe down in the right corner or for older versions swipe from bottom

Explanation:

6 0
2 years ago
while investigating the settings on your SOHO router, you find two IP address reported on the devices's routing table, which is
DochEvi [55]

Answer:

From the two IP addresses, 192.168.2.1 can be listed as the default gateway in local network devices.

The reason is that we are allocated with the ranges that are reserved for the local networks by RFC 1918.

These ranges are given as follows:

  • For (10/8 prefix)  

                            10.0.0.0 - 10.255.255.255

  • (172.16/12 prefix)

                            172.16.0.0 - 172.31.255.255

  • (192.168/16 prefix)

                            192.168.0.0 - 192.168.255.255

Moreover the default gateway for a device can also be known by the commands ipconfig or  ipconfig/all on the command prompt.

<h3>I hope it will help you!</h3>
7 0
2 years ago
Who wants to give free points to me?
Bad White [126]

Answer:

I can :) just comment lol

3 0
3 years ago
Read 2 more answers
Which presentation guideline helps people with vision disabilities?
Alina [70]
Providing audio with images
4 0
3 years ago
Read 2 more answers
Other questions:
  • What will happen if Sam goes to the View menu, clicks Toolbars, and then clicks Picture?
    12·2 answers
  • The memory unit of a computer has 2M Words of 32 bits (or 4 bytes) each. The computer has an instruction format with 4 fields: a
    14·1 answer
  • To gain a competitive edge this year, the upper management of a global IT company has decided to focus on customer service, empl
    13·1 answer
  • CHALLENGE 7.1.1: Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output f
    9·1 answer
  • Write a program named RectangleArea to calculate the area of a rectangle with a length of 15.8 and a width of 7.9. The program s
    10·1 answer
  • Q: If a program is invoked with "python program.py -r input.dat output.dat", what are the elements of argv?
    10·1 answer
  • Helllllllllppppppppppp
    9·1 answer
  • In the program below, which two variables have the same scope?
    9·2 answers
  • What is this....... Iam booking train to patna. ​
    13·2 answers
  • 5. Why do we need programming language?​
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!