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]
4 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]4 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
Convert the following decimal numbers into binary numbers. <br><br>pls ASAP<br>​
Anna007 [38]

Explanation:

Given, the cost price of the TV is Rs 24600. Now, the cooler costs Rs 800 more than one-third of the TV. The cost price of the cooler is Rs 9000.

6 0
3 years ago
Which teamwork characteristic motivates your team members to perform better?
scoundrel [369]
Maybe Encouragement? I don't know, are there any choices to choose from?
4 0
3 years ago
Read 2 more answers
Which is an example of synchronous communication. Text message e-mail voicemail telephone conversation
enot [183]

Answer:

Text Messages

Explanation:

Synchronous communication is a simultaneous communication between two people. This is the type of serial communication where two person can communicate at the same time. This type of communication exclude face to face communication and phone communication.

for example

during Chat when we are taking to someone he also can reply the same time.

3 0
3 years ago
Read 2 more answers
Which programming language uses mnemonic code to represent data, instructions, and memory locations?
Mars2501 [29]

Answer:

B. Assembly Language

Explanation:

Assembly language is the first language that used English like words for representing data, instruction and memory locations. The English-like words are called Mnemonics.

Assembly language uses translator to translate the code into machine language. The translator is called assembler.

The mnemonics examples are:

ADD

SUB

DIV

MUL ..

4 0
3 years ago
Read 2 more answers
3. How has air - conditioning affected human life?​
meriva

Answer:

Sudden changes in temperature and humidity affect the respiratory system. ... The air circulation can transmit infectious respiratory diseases. Airborne dust and fungi can cause allergic reactions. Air conditioning is associated with chronic rhinitis and pharyngitis, throat irritation and hoarseness.

6 0
3 years ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In 1–2 sentences, descri
    9·2 answers
  • Give the Division Hashing function and the index it maps the key 2000 into, assuming a primary storage area array size of 61 ele
    6·1 answer
  • Based on the Pizza database you imported, complete the SQL statement below to add the column VIP to the customers table. The cus
    8·1 answer
  • Which of the following conditions will maximize the amount of interest you earn
    5·1 answer
  • A mobile device is freezing almost daily. The device remains powered on and the screen illuminated. The user restarts the device
    12·1 answer
  • Which sentence best describes the executive branches of state
    12·1 answer
  • Id is 960 1788 6557 <br><br> pass is nick2020 <br><br> anybody can join
    10·1 answer
  • Which generation computer supported GUI operating system?​
    11·1 answer
  • Thinking about the career cluster, "Information Technology", which of these careers would typically NOT be included? (Choose thr
    10·2 answers
  • A _______ attack is where the input includes code that is then executed by the attacked system.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!