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]
3 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]3 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
What is a computer meaning
goldenfox [79]

Answer:

computer means an electronic machine which process raw data and gives meaningful information to the user

7 0
3 years ago
Convert the following C program to C++.
ki77a [65]

Answer:

The program equivalent in C++ is:

<em>#include <cstdio></em>

<em>#include <cstdlib></em>

#define SIZE 5

using namespace std;

<em>int main(int argc, char *argv[]) {</em>

<em>int numerator = 25;</em>

<em>int denominator = 10;</em>

<em>FILE * inPut = fopen(argv[1], "r");</em>

<em>FILE * outPut = fopen(argv[2], "w");</em>

<em>float result = (float)numerator/denominator;</em>

<em>fprintf(outPut,"Result is %.2f\n", result);</em>

<em>float arr[SIZE];</em>

<em>for(int i = 0; i < SIZE; i++) {</em>

<em>fscanf(inPut, "%f", &arr[i]);</em>

<em>fprintf(outPut, "%7.4f\n", arr[i]);</em>

<em>}</em>

<em>return 0;</em>

<em>}</em>

Explanation:

See attachment for explanation.

Each line were numbered with equivalent line number in the C program

Download cpp
8 0
3 years ago
Write a program that accepts two integers from the user and perform one of the four arithmetic operations based on user’s choice
alex41 [277]

Answer:

do you still need the answer? or am i to lateeee

Explanation:

6 0
3 years ago
Do you need a internet browser to go to the intrnet?​
Sloan [31]

Answer:

No you do not need a interent browzer to get to the internet.

Explanation:

7 0
3 years ago
Read 2 more answers
What can we do to positive interaction online?
Julli [10]

Answer:

We can help eachother out with things.

Explanation:

Eg. Schoolwork and homework because our stress level will decrease.

8 0
3 years ago
Read 2 more answers
Other questions:
  • Overloading in methods are popular in programming, and why overloading is important.
    6·1 answer
  • Question 1<br> a node is.<br> •a sever<br> A Cell Phone<br> A Laptop<br> a device on a network
    13·1 answer
  • Lydia noticed that she feels tired and out of breath after walking her dog up a hill in the park. Which area of fitness does she
    8·1 answer
  • A company has its branches spread over five places in a state. It has become difficult for employees to transfer information and
    7·1 answer
  • I don't understand how to write code for this in Java using nested for loops only. The official question is: write a program tha
    8·1 answer
  • Which options are available when a user modifies a recurring appointment? Check all that apply. Open this occurrence Open the fi
    12·2 answers
  • You have a team member on a remote project who is not fluent in English and
    15·1 answer
  • A network consists of 75 workstations and three servers. The workstations are currently connected to the network with 100 Mbps s
    12·1 answer
  • Please help I will mark brainliest
    5·1 answer
  • The full meaning of UNIVAC and ENIAC​
    5·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!