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
Alla [95]
3 years ago
5

Write a function called getRowTotal. This function should accept a two-dimensional int array as its first parameter (the array h

as 5 columns) and an integer as its second parameter. The second parameter should be the subscript of a row in the array. The function should return the total of the values in the specified row. Only write the function no need to write the main function
Computers and Technology
1 answer:
garik1379 [7]3 years ago
8 0

Answer:

The solution is implemented using C++

int getRowTotal(int a[][5], int row) {

  int sum = 0;

  for(int i =0;i<5;i++)

  {

      sum += a[row][i];

  }

  return sum;

}

Explanation:

This defines the getRow function and the parameters are arr (the 2 d array) and row and integer variable

int getRowTotal(int arr[][5], int row) {

This defines and initializes sum to 0

  int sum = 0;

This iterates through the row and adds the row items

<em>   for(int i =0;i<5;i++)    { </em>

<em>       sum += arr[row][i]; </em>

<em>   } </em>

This returns the calculated sum

  return sum;

}

You might be interested in
Who wrote the book of luke​
netineya [11]
Luke himself wrote t the book
5 0
3 years ago
Which of the following is not included in the manufacturing industry cluster?
max2010maxim [7]
Printing is not included in the manufacturing industry cluster
6 0
3 years ago
Read 2 more answers
Fredrico has to lead a training for his company. He wants to include a visual element to help engage his audience. What type of
andreyandreev [35.5K]
Presentation software is probably his best option. It would allow him to present visual and audio supplements to his audience.
8 0
3 years ago
Read 2 more answers
Virtual machines are not susceptible to the threats and malicious attacks like other operating systems.
Nonamiya [84]

Answer:

flamingo was here

Explanation:

3 0
3 years ago
In an attempt to reach an all-time record for its premier, ads for the highly anticipated Avengers: Endgame are run on all the m
cricket20 [7]

Based on the contextual situation, the cable stations across the country from 8:00 p.m. to 10:00 p.m., or during <u>Late-fringe time</u>.

<h3>What is Late-Fringe Time?</h3>

Late Fringe time is a term used in television that describes the television hours that follow the prime time.

Generally, the prime period is usually between 8:00 p.m. to 10:00 p.m., while the Late Fringe time is around 11 p.m. to 1 a.m.

Hence, in this case, it is concluded that the correct answer is "<u>Late-Fringe period."</u>

Learn more about Television hours here: brainly.com/question/1006994

8 0
3 years ago
Other questions:
  • Isabella's manager has asked her to write up a _____ that describes their company's interest in developing a custom software sol
    13·1 answer
  • Who create and developed castlevania?
    7·1 answer
  • In general, use no more than _____ font types in a worksheet.
    11·1 answer
  • A _____ is a network that uses multiple access points to link a series of devices that speak to each other to form a network con
    10·1 answer
  • A technician wants to update the organization's disaster recovery plans. Which of the following will allow network devices to be
    13·1 answer
  • Select the correct answer.
    8·2 answers
  • Technician A says that the first step in the diagnostic process is to verify the problem (concern). Technician B says that the s
    11·1 answer
  • Paul is playing a game when his computer shuts down unexpectedly. Paul has noticed recently that his fans are running very loud.
    13·1 answer
  • When you take a multiple-choice test, you are relying on ________, a means of retrieving information out of your long-term memor
    8·1 answer
  • Use the drop-down menus to complete the statements about message marking, categorizing, and flagging.
    13·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!