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
Bumek [7]
2 years ago
13

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:

Computers and Technology
1 answer:
NARA [144]2 years ago
8 0

Answer:

Here is a UpdateTimeWindow() method with parameters timeStart, timeEnd, and offsetAmount

// the timeEnd and timeStart variables are passed by pointer

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

// this can also be written as  *timeStart = *timeStart + offsetAmount;

*timeStart += offsetAmount;  //adds value of offsetAmount to that of //timeStart

// this can also be written as  *timeEnd = *timeEnd + offsetAmount;

  *timeEnd += offsetAmount;  } //adds value of offsetAmount to that of //timeEnd

Explanation:

The function has three int parameters timeStart, timeEnd, and offsetAmount.

First two parameters timeStart and End are passed by pointer. You can see the asterisk sign with them. Then in the body of the function there are two statements *timeStart += offsetAmount; and *End+= offsetAmount; in these statements the offsetAmount is added to the each of the two parameters timeStart and timeEnd.

You might be interested in
In a C++ program, one and two are double variables and input values are 10.5 and 30.6. After the statement cin >> one >
SSSSS [86.1K]

Answer:

variable one stores 10.5 and two stores 30.6

Explanation:

In c++ language, the cout keyword is used to write to the standard output. The input from the user is taken by using the cin keyword.

For the input from the user, a variable need is declared first.

datatype variable_name;

The input can be taken one at a time as shown.

cin >> variable_name;

The input for more than one variable can be taken in a single line as given by the syntax below.

1. First, two variables are declared.

datatype variable_name1, variable_name2;

2. Both input is taken simultaneously as shown.

cin >> variable_name1, variable_name2;

For the given scenario, two double variables are declared as below.

double one, two;

The question mentions input values for the two double variables as 10.5 and 30.6.

3. The given scenario takes both the values as input at the same time, in a single line as shown below.

cin >> one >> two;

4. After this statement, both the values entered by the user are accepted.

The values should be separated by space.

First value is stored in the variable one.

Second value is stored in the variable two.

5. The user enters the values as follows.

10.5 30.6

6. The value 10.5 is stored in variable one.

7. The value 30.6 is stored in variable two.

The c++ program to implement the above is given below.

#include <iostream>

using namespace std;

int main() {

   double one, two;      

   cout << " Enter two decimal values " << endl;

   cin >> one >> two;

   cout << " The input values are " << endl;

   cout << " one : " << one << " \t " << " two : " << two << endl;

   return 0;

}

OUTPUT

Enter two decimal values  

10.5 30.6

The input values are  

one : 10    two : 530.6

6 0
3 years ago
According to Android’s suggested user interface standards, repeatedly pressing the app icon on an app’s action bar will eventual
marusya05 [52]

Answer:

False

Explanation:

No app icon on app's action bar will move the device  to its home screen.It is not a valid statement.

8 0
2 years ago
Read 2 more answers
3 advantages of using desktop computer rather than a laptop computer
Vilka [71]
Desktop can be customized and it usually has more processing power than laptops, as for laptops are better for portable work like word document
6 0
3 years ago
Read 2 more answers
If you want to share files on your computer with other Windows computers, what should you have installed and enabled on your com
Troyanec [42]

Answer: One Drive

Explanation:

5 0
2 years ago
Many homeowners find it convenient to use interconnected electronic devices controlled through a computer or smartphone connecte
kkurt [141]

Answer:

The most probable negative impact that IoT devices can have on users is the increase vulnerability of information technology cybersecurity, being that access can be gained into the system through another device connected to an IoT device from which it is theoretically possible to launch malicious computer codes, using both old and present day hacking technologies, due to the different securities, categories and systems of devices connected to the IoT

Explanation:

The negative impacts of Internet of Things IoT devices on users are

1) Loss of privacy 2) Network complexity increase 3) Increase in the dependence on technology 4) Increased unemployment, 5) Lack of compatibility between devices

5 0
2 years ago
Other questions:
  • April 107 90 29 31 66 0.344
    8·1 answer
  • When records are in ____ order, they are arranged one after another on the basis of the value in a particular field.?
    9·1 answer
  • ¿por que la toria de lamarck sobre el alargamiento del cuello de las jirafas por el esfuerzo continuado no pasara a sus descendi
    10·1 answer
  • You have been asked to create a query that will join the Production.Products table with the Production.Categories table. From th
    6·1 answer
  • An instruction book or program that takes users through a prescribed series of steps to learn how to use a program is called (a)
    10·1 answer
  • Patronage of most Medieval musicians was supplied by the
    13·1 answer
  • When an instruction is sent to the CPU in a binary pattern, how does the CPU know what instruction the pattern means
    7·1 answer
  • Need help on Assignment 4: Evens and Odds
    5·1 answer
  • Given three floating-point numbers x, y, and z, output x to the power of z, x to the power of (y to the power of z), the absolut
    12·1 answer
  • 1. The running configuration is also known as the _____________ (Select Two) a. Startup config b. Working configuration c. Curre
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!