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
zloy xaker [14]
2 years ago
10

Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offsetAmount. Each parameter is of type int. The fu

nction adds offsetAmount to each of the first two parameters. Make the first two parameters pass by pointer. Sample output for the given program: timeStart = 3, timeEnd = 7 timeStart = 5, timeEnd = 9
Computers and Technology
1 answer:
Evgesh-ka [11]2 years ago
5 0

Answer:

C code is given below

Explanation:

// Define a function UpdateTimeWindow() with parameters timeStart, timeEnd, and offSetAmount. Each parameter is of type int. The function adds offSetAmount to each of the first two parameters. Make the first two parameters pass-by-pointer. Sample output for the given program:

#include <stdio.h>

// Define void UpdateTimeWindow(...)

void UpdateTimeWindow(int*timeStart, int* timeEnd, int offSetAmount){

*timeStart = *timeStart+ offSetAmount;

*timeEnd = *timeEnd+ offSetAmount;

}

int main(void) {

  int timeStart = 0;

  int timeEnd = 0;

  int offsetAmount = 0;

  timeStart = 3;

  timeEnd = 7;

  offsetAmount = 2;

  printf("timeStart = %d, timeEnd = %d\n", timeStart, timeEnd);

  UpdateTimeWindow(&timeStart, &timeEnd, offsetAmount);

  printf("timeStart = %d, timeEnd = %d\n", timeStart, timeEnd);

  return 0;

}

You might be interested in
Vadik is creating a program where the user inputs their grade level and the program tells them which sports teams they are allow
Lelechka [254]
He should use if, elif, else
4 0
2 years ago
Read 2 more answers
3 ᴍᴜʟᴛɪᴘʟᴇ-ᴄʜᴏɪᴄᴇ Qᴜᴇꜱᴛɪᴏɴꜱ
Damm [24]
4, 1, and 3

The last one I am going to say three because I know that friends show other friends so I wouldn’t call that “private”
6 0
2 years ago
Given an input array of strings (characters) s, pick out the second column of data and convert it into a column vector of data.
hodyreva [135]

Answer:

Consider the following code.

Explanation:

save the following code in read_and_interp.m

 

function X = read_and_interp(s)

[m, n] = size(s);

X = zeros(m, 1);

for i = 1:m

if(str2num(s(i, 2:5)) == 9999)

% compute value based on previous and next entries in s array

% s(i, 2:5) retrieves columns 2-5 in ith row

X(i,1) = (str2num(s(i-1 ,2:5)) + str2num(s(i+1,2:5)))/2;

else

X(i,1) = str2num(s(i,2:5));

end

end

end

======================

Now you can use teh function as shown below

s = [ 'A' '0096' ; 'B' '0114' ; 'C' '9999' ; 'D' '0105' ; 'E' '0112' ];

read_and_interp(s)

output

ans =

96.000

114.000

109.500

105.000

112.000

7 0
3 years ago
Compared with a star topology, a hierarchical topology: a. is more effective at handling heavy but short bursts of traffic. b. a
Eduardwww [97]

Answer:

c. offers a great deal of network control and lower cost.

Explanation:

A network topology can be defined as a graphical representation of the various networking devices used to create and manage a network.

Compared with a star topology, a hierarchical topology offers a great deal of network control and lower cost.

4 0
2 years ago
Let’s say you attach four images to accompany an important tweet that you’ve composed in the Hootsuite Compose Box. On Twitter,
Damm [24]
I doub between:

<span>  C)  A series of 4 full size, but individual tweets (with the tweet copy appearing above the first image of the series)  D)  A collage format, with full size images</span>

6 0
3 years ago
Other questions:
  • Which item would you most likely keep in a database
    9·2 answers
  • Wireframing and storyboarding are helpful in which step of web development?
    13·2 answers
  • Hello my friends i am trying to reboot my i phone 4 but i could not i tried many ways can u help me
    14·1 answer
  • Write the definition of a function that takes as input the three numbers. The function returns true if the first number to the p
    12·1 answer
  • Wrtie down some containerization technology.
    11·1 answer
  • Complete the statement using the correct term.
    6·1 answer
  • You were just hired as an IT Specialist for Smalltown School District. Your first assignment is to review a problem area&amp; in
    11·1 answer
  • What's the best item in the binding of isaac?
    13·1 answer
  • What is the Cycle of Dependency?
    14·1 answer
  • Microsoft recommends when that you create passwords with upper and lowercase letters, numbers, symbols, and use at least _______
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!