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
The ‘capacity for emergency management and response personnel to interact and work well together’ describes which of the key com
dybincka [34]

Answer:

The correct answer to the following question is option A. Interoperability

Explanation:

Interoperability is the capacity to interact and work together. In other words, interoperability is an ability in which different types of systems, applications, products or devices to communicate and connect to work together, without any effort of end-user.

Interoperability is that property which allows for an unrestricted sharing of the resources between the different systems.

5 0
3 years ago
Read 2 more answers
Which is a requirement for searching for a template
Lina20 [59]

Answer:

umm... you did not discribe the anwsers, i cannot help you

8 0
3 years ago
Ann has always wanted to be the person on the news broadcast who delivers the weather updates. She’s looking into becoming a bro
Marrrta [24]
The answer should be A.
5 0
3 years ago
Read 2 more answers
What is a nonprofit organization that has assumed the responsibility for Internet Protocol (IP) address space allocation, protoc
Sloan [31]

Answer:

ICANN

Explanation:

The Internet Corporation for Assigned Names and Numbers (ICANN) is saddled with the responsibility of allocating IP addresses among other duties.

Cheers

6 0
4 years ago
What tool enables you to easily delete, add, or resize filesystems without regard to their physical locations on a hard disk?
frosja888 [35]

Answer:

Logical Volume Management Tool

Explanation:

With Logical Volume Management(LVM), administrators and even users are offered a more flexible approach of managing space in disk storage. LVM provides method for sharing space(volume) on large storage devices (such as hard disk) with such greater flexibility than conventional partitioning strategies to store data. With LVM, users can easily duplicate, delete, add, resize and even file systems without much information about their physical locations on the storage device.

<em>Hope this helps!</em>

7 0
3 years ago
Other questions:
  • Spencer is a recent graduate who finds a dream car that costs $45,000. Even better, there's a 0% APR for 36 months offer from th
    13·1 answer
  • Mobile providers can be susceptible to poor coverage indoors as a result of: a high degree of latency. network congestion that c
    8·1 answer
  • kindly for the website of stedeo code.org if I login is the time of logging appears at my teacher ??is it registered ​
    14·1 answer
  • Employees at a store are paid daily wages according to the following rules.
    6·1 answer
  • Java Question-5 Declare and initialize two variables called first and second. Write a single statement that will print the messa
    15·1 answer
  • What will save you the most money when trying to reduce the cost of college
    5·2 answers
  • What is the full meaning of Internet and WiFi
    6·2 answers
  • Will mark brainliest
    14·1 answer
  • MyProgramming Lab
    5·1 answer
  • What is the advantage of learning through story compared to learning through personal experience?
    7·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!