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
Join my giggl PLEASE i am so bored link will be in comments
asambeis [7]

Answer:

in which app we had to join

5 0
2 years ago
Read 2 more answers
Which statement about synchronous communication is true?
tangare [24]
In general, synchronous communication means you have to wait for the answer all the time. The programming logic is simpler, but the cost that you spend a lot of time waiting.

If the options are:

<span>a. The people communicating don't need to be online at the same time.
b. There is lag time in the communication.
c. The communication occurs in real time.

a is false, you do need to be online to receive the message
b is true, typically you continue only after an acknowledgement
c is true, you wait for acknowledgement that occurs in real time (not necessarily fast though)</span>
3 0
3 years ago
When inserting a fly in animation what is the first step in the process?
marishachu [46]

Answer:

The answer: select the element you wish to animate.

Explanation:

4 0
3 years ago
Question 5 of 10
Drupady [299]
The programs you need for you are not even done yet
3 0
2 years ago
Hi guys could someone please help me ASASP
goldenfox [79]

Answer:

nope u gonna fail ahhahaha

Explanation:

my dead cat ran across my keyboard

8 0
3 years ago
Other questions:
  • Which protocol can be used to send ipv6 packets over an ipv4 network?
    5·1 answer
  • When IPv4 addressing is manually configured on a web server, which property of the IPv4 configuration identifies the network and
    12·1 answer
  • What is the diffrence between the the grassland and the savanna biomes
    11·2 answers
  • Blender is used by which video game team member?
    15·1 answer
  • You can place an insertion point by clicking in the field or by pressing ____.
    13·1 answer
  • Any one know??please let me know
    15·2 answers
  • The New option is found in the ...............tab.​
    6·2 answers
  • What is the duty of WHH? (white hat hackers)<br><br><br>ANY WHH HERE?<br>​
    8·1 answer
  • 25 points
    8·2 answers
  • in a particular factory, a team leader is an hourly paid production worker who leads a small team. in addition to hourly pay, te
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!