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
A characteristic often associated with entrepreneurship is
FromTheMoon [43]

Answer:

with small businesses

Explanation:

to make a lager profit

3 0
3 years ago
Dates of birth were entered into a computer program . The data was stored in the format DAY/MONTH/YEAR.The program rejected this
Marina CMI [18]

Answer:

i. This value was not accepted because we have 12 months and not 13.

ii. This is because the user entered the value for the day as value for the month.

Explanation:

i. Why was this not accepted?

This value was not accepted because we have 12 months and not 13. The user entered a value that was above the maximum value registered for the number of months in a year- which is 12.

ii. Why do you think this error occurred

This is because the user entered the value for the day as value for the month.

This could be because the user uses a date system different from that of the program.

3 0
2 years ago
Match the partition type to its description.
zlopas [31]

Answer:

A partition with an extended partition is a logical partition.

The partition with the boot loader is the system partition.

The section of the hard drive where you will install the operating system is the primary partition.

Read more on Brainly.com - brainly.com/question/14356373#readmore

Explanation:

7 0
3 years ago
Select the correct answer. Cerise is explaining computer viruses to her students. What is the best way for her to explain a comp
Anna [14]

Answer:

B. it is a code that creates multiple copies on loading and damages the system

Explanation:

it is a app which they send to you on your computer or mobile phone

maybe click this link you will get free gift

3 0
2 years ago
Coordination in a global information system requires a _____ architecture for data, standardization within departments.
Phantasy [73]

Coordination in a global information system requires a decentralized architecture for data, standardization within departments

6 0
2 years ago
Other questions:
  • What aspect of the internet makes it fault-tolerant?
    6·1 answer
  • High Frequency Traders are
    5·1 answer
  • What is software that, while purporting to serve some useful function and often fulfilling that function, also allows Internet a
    11·1 answer
  • Amanda needs to create an informative print brochure for her local library’s fundraiser dinner. What critical detail must she ha
    14·2 answers
  • Why is the cyber community important???
    8·2 answers
  • CHALLENGE 7.1.1: Initialize a list. ACTIVITY Initialize the list short.names with strings 'Gus', Bob, and 'Ann'. Sample output f
    9·1 answer
  • $8.25/hour; _____$/year, when working 40 hours a week.
    6·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • Im lonellly whos down to date me
    7·2 answers
  • Writing down your main ideas, subpoints, and supporting material, then using geometric shapes and arrows to indicate logical rel
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!