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
Brrunno [24]
2 years ago
7

Write your own printArray() function found in Processing for the Arduino. For simplicity, you can limit printArray() to integer

arrays and you will also pass the size of the array to your function. For example, given the following code:
int terps[5] = {7, 9, 12, 1, 46};
void printArray(int arrayToPrint[], int arraySize) { // YOUR CODE HERE }
void setup()
{ // put your setup code here, to run once:
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
printArray(terps,sizeof(terps)/sizeof(int)); delay(1000);
}

You should repeatedly see the following in the serial monitor:

[0]: 7
[1]: 9
[2]: 12
[3]: 1
[4]: 46
Computers and Technology
1 answer:
VLD [36.1K]2 years ago
6 0

Answer:

Follows are the method definition to this question:

void printArray(int arrayToPrint[], int arraySize) //defining a method printArray that accepts two array in its parameters

{

for (int j = 0; j < arraySize; j++)//defining for loop print Serial numbers

{

Serial.print("[");//use print method to print square bracket

Serial.print(j);//use print method to print Serial numbers

Serial.print("]: ");//use print method to print square bracket

Serial.println(arrayToPrint[j]);//printing array value

}

}

Explanation:

In the above code, a method "printArray" is declared that holds two arrays "arrayToPrint and arraySize" as a parameter, and inside the method is used for loop to print the values.

In the loop, first, it uses the square bracket to print the serial number and in the last step, it prints array values.

You might be interested in
Someone who wants to learn a skilled trade on the job should consider
Alexeev081 [22]
Someone who wants to learn a skilled trade on the job should consider enrolling in class for the knowledge and skills.
5 0
3 years ago
Read 2 more answers
Suppose you have a 16-bit machine with a page size of 16B. Assume that any unsigned 16-bit integer can be a memory address. Also
irinina [24]

Answer:

2^11

Explanation:

Physical Memory Size = 32 KB = 32 x 2^10 B

Virtual Address space = 216 B

Page size is always equal to frame size.

Page size = 16 B. Therefore, Frame size = 16 B

If there is a restriction, the number of bits is calculated like this:  

number of page entries = 2^[log2(physical memory size) - log2(n bit machine)]

where

physical memory size = 32KB  which is the restriction

n bit machine = frame size = 16

Hence, we have page entries = 2^[log2(32*2^10) - log2(16)] = 2ˆ[15 - 4 ] = 2ˆ11

7 0
3 years ago
Sharon is thinking about opening a bakery. She knows she wants to set her own hours, reduce her stress and make a profit. But sh
kondaur [170]
C would not be a beginner move.

hope it helps
6 0
3 years ago
A network administrator is planning redundant devices and cabling in a switched network to support high availability. Which bene
a_sh-v [17]

Answer:

Redundant paths can be available without causing logical Layer 2 loops.

Explanation:

  • Spanning Tree Protocol is used to allow redundancy in the Layer 2 switched networks without creating cycles/circles also called loops.
  • These loops are called physical loops.
  • When two parts of the switched network are connected via two or more Layer 2 switches this result in a loop.
  • This affects the performance of the network as the result of broadcast packets flooding.
  • STP puts one port of the switch to forward mode and the rest of the ports within the same part of the network to the blocking mode to avoid broadcast packet flooding. STP puts all the ports that are allowing redundant paths to block mode and the one port that is left after this is placed in forward mode.
  • Spanning Tree Algorithm is used by STP to determine the optimal path  of switch to the network.
  • Bridge Protocol Data Units are used to share the information about the optimal path determined by the spanning tree algorithm with other switches.
  • This information helps STP to eliminate the redundant paths.
  • So this is how STP tracks all the links in the switched network and eliminates redundant loops by allowing only one active path to the destination while blocking all other paths.
7 0
3 years ago
Which font attribute would be most appropriate to make a papers heading stand out?
eimsori [14]

If you want your heading to pop out I would go for bold Becuase it shows the letters darker and bigger which would make the heading the center of attention.

7 0
3 years ago
Read 2 more answers
Other questions:
  • T in your computer will you use to plug in your camera?
    11·1 answer
  • Does a BIOS reset erase data such as pictures, programs or other things like that?
    13·1 answer
  • • In your response, please include some examples of the three different types of storage.
    11·2 answers
  • Sometimes news organizations have biasis because
    5·1 answer
  • Can someone help please
    12·1 answer
  • ______ is/are the replacement of human operation and control of machinery with some form of programmed control.
    11·1 answer
  • Which of the following is NOT part of the URL for an Internet web site?
    13·1 answer
  • What will be the results of the following code? final int Array_Size = 5;An error will occur when the program runs. There will b
    10·1 answer
  • What is 36 Denary in Binary?? PLEASE ANSWER I WILL GIVE U BRAINLY!!
    9·2 answers
  • Refer to the image on the right. Then, using the drop-down menu, identify the correct printer type. A: inexpensive home printer
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!