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
Computer in country development explain explain explain in presentation.<br>​
yaroslaw [1]

Answer:

A computer is a machine that can be programmed to carry out sequences of arithmetic or logical operations automatically. Modern computers can perform generic sets of operations known as programs. These programs enable computers to perform a wide range of tasks. A computer system is a "complete" computer that includes the hardware, operating system (main software), and peripheral equipment needed and used for "full" operation. This term may also refer to a group of computers that are linked and function together, such as a computer network or computer cluster

6 0
3 years ago
Alguien me prestta una cuenta de osu!, porfa
Mariana [72]

Answer:

english please........

7 0
3 years ago
What is the best anime of all time?​
Blizzard [7]

(My opinion)  Naruto! (then Boruto is on it's way to becoming good)

but other people might say my hero academia or any of the dragon ball saga

4 0
3 years ago
Can someone see what this says? ​
Rzqust [24]

Not really. xD

I only see "Not A.." and It's backwards too soooo..

3 0
3 years ago
I GOT A 65% LAST TIME AND IM DOING RETAKE! PLEASE DONT FAIL ME THIS TIME
yawa3891 [41]

Answer:

Explanation: c vecause am pro

4 0
3 years ago
Read 2 more answers
Other questions:
  • Respond to the following in three to five sentences. Select the workplace skill, habit, or attitude described in this chapter (a
    12·1 answer
  • ________ results when leisure time and available tools allow us to engage in creative acts.
    14·1 answer
  • Which of the following best describes Roblox?
    12·2 answers
  • Force field meaning in science fiction
    6·1 answer
  • What is an identified component of a software program that might allow a hacker or other intruder to gain entry and control of a
    10·2 answers
  • Which of the following prefixes would be best to use when measuring your own mass?
    15·1 answer
  • Using complete sentences post a detailed response to the following.
    5·2 answers
  • What is the correct name for the words Home, Insert, Design, Layout, References, etc. in the ribbon in Word 2016?
    7·1 answer
  • MyProgramming Lab
    5·1 answer
  • what is cicada 3301? i will give brainliest if you give me a correct answer (not copy and pasted) and somewhat well detailed, i
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!