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
Why is a computer called"a computer"?​
sleet_krkn [62]

Answer:

because it was originally given to humans (himan computers) who performed numerical calculations using mechanical calculators.The term was later given to mechanical devices as they began replacing human computers.

4 0
2 years ago
Read 2 more answers
Que son los sistemas de control con retroalimentacion
iren2701 [21]
Existen 2 clases comunes:
sistema de lazo abierto: la salida no efecto sobre el sistema
sistema de lazo cerrado: la toma de desiciones del sistema de la entrada si no también de la salida
5 0
3 years ago
Which line of code in this program is MOST likely to result in an error
rjkz [21]

Answer:

What are the choices?

Explanation:

7 0
2 years ago
Read 2 more answers
In a flashdisk wich icon can you use to open files in computer​
Dvinal [7]

Answer:

In a flashdisk,

If you are windows: click "my computer", and under the "cpmputer" section, you will find your flashdisk's name, and click it, in there you can find and also open your files.

If you are Mac: click "Finder", click "Desktop" and find your flashdisk's name, and click it, in there you can find and also open your files.

6 0
3 years ago
The Open Systems Interconnection (OSI) is a conceptual model whose purpose is to make networks more manageable. Its objectives i
andrew-mc [135]

Answer:

A. data-link layer

Explanation:

Data-link layer is the first layer and allows a contiguous sequence of bits to be transmitted through the network.

On top of it is the Network Layer and it handles the task of routing network messages from one computer to another.

Then comes the Transport Layer which is the basic layer at which one network computer communicates with another network computer.

6 0
2 years ago
Other questions:
  • Which of the following correctly describes the reason for quality customer service?
    15·2 answers
  • Which service is enabled on a cisco router by default that can reveal significant information about the router and potentially m
    10·1 answer
  • Can somebody explain me what this code does in a few or one sentence?#include #include using namespace std;int main () { const i
    12·1 answer
  • David has created a lot of styles and now his Quick Style Gallery contains styles he no longer uses.
    14·2 answers
  • 1. What are the built-in operations on classes?
    8·1 answer
  • Teniendo en cuenta la realidad mundial acerca de la pandemia, ¿cómo crees que impacta
    9·1 answer
  • Select the correct answer from the drop-down menu.
    15·2 answers
  • In which of the following stages of the development process is a team MOST likely to interview a potential user of an app?
    6·1 answer
  • This isn't an academic question, but can anyone help me change the face on my apple watch to a picture from my camera roll? I've
    15·1 answer
  • In what way, if any, is the impact of a given risk affected by the timing of a project?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!