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
Convert octal number 2470 to decimal number
Vikki [24]
In decimal it is:
0*8^0 + 7*8^1 + 4*8^2 + 2*8^3 = 1336

Basically adding up the place values.
3 0
3 years ago
Read 2 more answers
What is the primary way to access applications in window 10
Alex787 [66]

Choose Start, type the name of the application, like Word or Excel, in the Search programs and files box. In the search results, click the application to start it. Choose Start > All Programs to see a list of all your applications. You might need to scroll down to see the Microsoft Office group.

8 0
3 years ago
Although heart rate increases and decrease depending upon activity level on average a typical person heart rate is about _____ b
ExtremeBDS [4]

Answer:

72

The normal resting heart rate is between 70 and 100 bpm.

4 0
3 years ago
What are the major functions of a computer
murzikaleks [220]
A computer is a device whose main function is to process large amounts of information quickly and accurately, and this procedure is done thanks to hardware and software.
7 0
3 years ago
Which two computer peripherals are connected to the computer through a port?
chubhunter [2.5K]
Most computer devices are connected to the computer through port
Keyboard through usb port
Printer through usb port
Hand point device through usb port
Also computer equipped with LPT port for printers and COM port for additional devices like external modems e.t.c
7 0
3 years ago
Other questions:
  • _____ is a method of delivering software, in which a vendor hosts the applications, and customers access these applications over
    10·1 answer
  • Pros and cons of Processor Throttling or Scaling?
    13·1 answer
  • Explain what the 35ppm specification means
    13·1 answer
  • Jackson is teaching a class the concept of the binary number system. Which term will he use to refer to the leftmost bit of a bi
    7·1 answer
  • 1. What are the built-in operations on classes?
    8·1 answer
  • Differences between electromechanical era and electronic era in point.<br>PLZ HELP​
    6·1 answer
  • _ models are non visual ways of communicating how someone thinks about something in the natural world
    12·1 answer
  • What are the defenses to protect against these attacks?
    13·1 answer
  • WAP to find area of circle​
    12·1 answer
  • The development of online capabilities created the ________, an information- and communication-based electronic exchange environ
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!