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
natulia [17]
2 years ago
9

The following code accomplishes which of the tasks written below? Assume list is an int array that stores positive int values on

ly.int foo = list[0];for (int j =1 ; j < list.length; j++)if (list[j] > foo)foo = list[j];Group of answer choicesit stores the largest value in list (the maximum) in fooit stores the smallest value in list (the minimum) in fooit stores every value in list, one at a time, in foo, until the loop terminatesit counts the number of elements in list that are greater than foo
Computers and Technology
1 answer:
worty [1.4K]2 years ago
5 0

Answer:

it stores the largest value in list (the maximum) in foo

Explanation:

Initially foo is assigned as the first element of the list

Inside the loop, every element in the list will be compared with foo, starting from the second element. If an element is greater than foo, the new value of the foo will be that element. At the end of the loop, foo will be equal to the largest element in the list.

You might be interested in
Write a c++ function, largestnum, that takes as parameters a double array and its size and returns the index of the last occurre
miv72 [106K]
Not a Question so how am i supposed to help with this problem
6 0
2 years ago
The ____ function displays the highest value in a range.
Monica [59]
Max()

------------------------------------------------------------
5 0
3 years ago
Read 2 more answers
Need help coding this it uses input and I need to use the words good and morning
Masja [62]

Answer:

x = input ("Enter a word: ")

y = input ("Enter a word: ")

print ( x, " ", y)

Explanation:

This is the simplest way to write it using Python.

6 0
2 years ago
Într-o școală sunt n clase, fiecare având un număr diferit de elevi. Școală primește m pachete cu cărți, fiecare cu un număr dif
Sati [7]

Answer:

Number classes that received pack of books = n classes

Explanation:

Question:

There are n classes in a school, each with a different number of students. The school receives m packs of books, each with a different number of books. For a class to receive a pack, the number of students in that class must be equal to the number of books in the pack. Determine how many classes receive a pack of books.

Solution:

n = number of classes

m = number of pack of books

The above question didn't give the number of students in each class. Neither did it give the number of books in each pack. We would make assumptions in order to derive our answer.

Assumption 1: That the number of pack of books received corresponds to the number of classes in the school.

That is m = n .

Assumption 2:

That the number of students in each class corresponds to the number of books in each packs.

That is, If number of students are: 10, 15,20,25,30.

Each number of books in the each pack would be in that amount: 10, 15,20,25,30.

Since it is stated that for a class to receive a pack, the number of students in that class must be equal to the number of books in the pack.

Hence all classes would receive a

Pack of book based on our assumption.

Number classes that received pack of books = m classes

Note: A change in assumption would change the answer derived. For instance, if m is not equal to m and number of students not equal to number of packs, the answer would be different from the one we obtained above.

7 0
3 years ago
Vinton cerf has been called one of main fathers of the internet. what internet organizations did he chair or help found? what in
Strike441 [17]
<span>He served from 2000-2007 as chairman of the board of the Internet Corporation for Assigned Names and Numbers (ICANN), an organization he helped form. </span>Cerf<span> is the co-designer of the TCP/IP protocols and the architecture of the </span>Internet<span>.</span>
5 0
3 years ago
Other questions:
  • You are given a network of 10.50.24.0/21, which contains 2,048 addresses. what subnet mask should you use to divide this into fo
    7·1 answer
  • 80% OF QUESTIONS ARE ANSWERED IN UNDER 10 MINUTES why not mine
    15·2 answers
  • Which computer device is used to capture or copy a photograph to place in a report?
    14·1 answer
  • Caches are important to providing a high-performance memory hierarchy to processors. Below is a list of 32-bits memory address r
    9·1 answer
  • Consider an application that transmits data at a steady rate (for example, the sender generates an N-bit unit of data every k ti
    8·1 answer
  • In a distributed database system, the data placement alternative with the highest reliability and availability is Group of answe
    9·1 answer
  • To excel at these professions, you need to be able to combine an eye for elegant design with a mind that delights in efficient o
    8·1 answer
  • Who is willam afton from five nights at freddy
    13·2 answers
  • Describe psychographic differences among the past five generations of Americans that you learned about in this course. What type
    5·1 answer
  • Develop a program to sort a file consisting of bonks details in the alphabetical order of author names. The details of books inc
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!