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
Serjik [45]
3 years ago
9

Suppose that sales is a two-dimensional array of 10 rows and 7 columns wherein each component is of the type int , and sum and j

are int variables. Which of the following correctly finds the sum of the elements of the fifth row of sales?1. sum = 0;for(j = 0; j < 10; j++)sum = sum + sales[5][j];2. sum = 0;for(j = 0; j < 7; j++)sum = sum + sales[4][j];3. sum = 0;for(j = 0; j < 10; j++)sum = sum + sales[4][j];4. sum = 0;for(j = 0; j < 7; j++)sum = sum + sales[5][j];
Computers and Technology
1 answer:
Deffense [45]3 years ago
3 0

According to the given question, sales is a two-dimensional array and contains 10 rows and 7 columns wherein each component is of type integer and the variables sum and j are also of integer type.

<u>Explanation:</u>

In order to find the sum of the elements of the fifth row of sales, the correct piece of code should be:

sum=0;

for(j=0;j<7;j++)

sum=sum+sales[4][j];  

The indexing in an array always starts from zero, therefore, to calculate the sum of the fifth row, the user has to write 4 in the index to point to the fifth row.

You might be interested in
If I was to sort the months of the year in ASCENDING order alphabetically, which
bogdanovich [222]
The answer is C.) April
5 0
3 years ago
Coding with Loops Worksheet
BartSMP [9]

Answer:

if you give me brainliest i will answer your question

Explan

4 0
3 years ago
Read 2 more answers
Some people use the term _____ to refer to the case that contains and protects the motherboard, internal hard drive, memory, and
Volgvan

Answer:

System unit.

Explanation:

Some people use the term system unit to refer to the case that contains and protects the motherboard, internal hard drive, memory, and other electronic components of the computer from damage.

A system unit also referred to as chassis or tower can be defined as a hardware case that is typically used as a protective case for the main component or primary devices such as power supply, random access memory (RAM), graphics card, CD-ROM drive, Harddisk drive, motherboard, internal cables, central processing unit (CPU) that makes up a computer system.

Basically, the main purpose of a system unit is to properly house the main components of a computer, serve as an electrical insulator and to prevent them from any form of damage.

7 0
3 years ago
Rapunzel s-a născut într-un ţinut îndepărtat într-un regat necunoscut. Mama vitregă a închis-o pe Rapunzel într-un turn foarte î
andrey2020 [161]
Iche hebie zaft no guts dude
5 0
3 years ago
You learn Structured System Analysis and Design as a course in your department.List down some of the contribution of this course
AURORKA [14]

Answer:

There are a variety of legal types of organizations, including corporations, governments, non-governmental organizations, political organizations, international organizations, armed forces, charities, not-for-profit corporations, partnerships, cooperatives, and educational institutions etc.

Explanation:

Management is the process of guiding the development, maintenance, and allocation of resources to attain organizational goals. Managers are the people in the organization responsible for developing and carrying out this management process. Management is dynamic by nature and evolves to meet needs and constraints in the organization’s internal and external environments.

5 0
2 years ago
Other questions:
  • How do you get 99 points on sunny meadows simulation?
    6·2 answers
  • Your grandmother was an established artist and left you several original paintings after she died. Which of these statements is
    6·1 answer
  • What do you click to create a new presentation in Normal view
    14·1 answer
  • Assume that LO and HI have already been assigned as constants with LO &lt; HI, and x has been declared as DWORD in the data segm
    7·1 answer
  • ________ are used in input, processing, and output operations that can help create more efficient programs as the data can be pr
    11·1 answer
  • Describe Relational Query Languages and Operations.
    15·1 answer
  • Write a function SwapArrayEnds() that swaps the first and last elements of the function's array parameter.
    6·1 answer
  • Denise found a volume of documents in the trash bin that contained individuals, names, social security numbers and years of birt
    14·1 answer
  • What would give Lucy, an entry-level candidate, an edge over others while she seeks a programmer’s position? Lucy, an entry-leve
    11·1 answer
  • Write the technical terms for the following statements: The repeated working capacity of computer.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!