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]
3 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]3 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
Najbardziej znane przeglądarki internetowe
grin007 [14]

What is the question?????


4 0
4 years ago
Read 2 more answers
I'm trying to network two laptops together using ethernet cable but it isn't working. Why isn't it working
sladkih [1.3K]

Yes the ansewer is c bc you can look it up!

8 0
3 years ago
Add the following binary numbers. 101110010 and 111001101
bonufazy [111]

Answer:

101110010 is 370 in decimal (base 10, what we usually do math in) and 111001101 is 461 in decimal. The sum of 370 and 461 is 831, and 831 is binary is 1100111111. So, if you want the answer in decimal it is \boxed{831_{10}} and if you want the answer in binary, it is \boxed{1100111111_2}.

4 0
3 years ago
Suppose that the format for license plates in a certain state is two letters followed by four numbers. (a) How many different pl
Ymorist [56]

Answer:

(a) 6,760,000 plates

(b) 3,407,040 plates

(c) 6,084,000 plates

Explanation:

The very first thing to note about this question is the number of characters involved in the license plate format (6 characters in this case; 2 letters and 4 numbers). The letters come first and then the numbers follow.

There are a total of 26 possible letters (A-Z) and 10 possible numbers (0 - 9) that can be chosen. We can then proceed to the first question;

(a) Here, the total number of possible plates is to be determined. This is done as follows:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 10 possible numbers

So, total number of different plates will be obtained by multiplying all the possibilities: 26 × 26 × 10 × 10 × 10 × 10 = 6,760,000 plates

(b) This second part puts a constraint on the usage of the numbers, unlike the question (a), where there was no constraint at all.

Since there is no constraint on the letters, we can write that:

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

For the first number as well, we can write:

Character 3 (number): There are 10 possible numbers

However, for the remaining characters, the possibilities will continually reduce by a value of 1, since we can not use a number that has been used before. So,

Character 4 (number): There are 9 possible numbers

Character 5 (number): There are 8 possible numbers

Character 6 (number): There are 7 possible numbers

So, total number of different plates will be: 26 × 26 × 10 × 9 × 8 × 7 = 3,407,040 plates

(c) Here, repetitions are allowed as in questions (a), but there can not be four zeros. This implies that the maximum number of zeros in any plate will be three. Thus, there will be maximum possibilities on all characters until the last one which will be constrained.

Character 1 (Letter): There are 26 possible letters

Character 2 (Letter): There are 26 possible letters

Character 3 (number): There are 10 possible numbers

Character 4 (number): There are 10 possible numbers

Character 5 (number): There are 10 possible numbers

Character 6 (number): There are 9 possible numbers

Total number of plates will therefore be: 26 × 26 × 10 × 10 × 10 × 9 = 6,084,000 plates.

7 0
3 years ago
2. When was the Antikythera mechanism discovered? What year? <br>​
Vlad [161]

Answer: 1901

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • What are the changes in ios 14.2? What are the benefits of the ios developer program? What is next for Apple? Base your answers
    14·1 answer
  • Run the C-LOOK algorithm (requests can only be serviced when the head is moving toward higher numbered tracks); the head is curr
    12·1 answer
  • A 10MB file is compressed into a 2MB file for storage. What is the compression ratio?
    6·1 answer
  • Why does esherick say the name of the boxer rebellion in inaccurate
    5·1 answer
  • To properly insert a memory module, you must locate the direction of the ______ .
    14·1 answer
  • Angelika just submitted her product for the first time, and she had 2 errors, 3 warnings, and 5 notifications. What does she nee
    7·2 answers
  • How do you think advances in processors affect corporations that discover the computers they purchased just a couple of years ag
    10·1 answer
  • What is the purpose of this parallelogram shape in a flowchart?
    15·1 answer
  • What is a decryption key?​
    8·1 answer
  • What are three ways a person may use a computer without realizing it?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!