answer.
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
Masteriza [31]
2 years ago
8

What would be the results of the following code? int[] array1 = new int[25]; … // Code that will put values in array1 int value

= array1[0]; for (int a = 1; a < array1.length; a++) { if (array1[a] < value) value = array1[a]; }
Computers and Technology
2 answers:
Marina CMI [18]2 years ago
5 0

Answer:

'value' contains the minimum value in the array, array1.

Explanation:

In the code:

int[] array1 = new int[25];

…

// Code that will put values in array1

int value = array1[0];

for (int a = 1; a < array1.length; a++) {

   if (array1[a] < value) value = array1[a];

}

We declare an integer array array1 of size 25.

We initialize the variable 'value' to the first element of the array , array1[0].

Then we iterate through the array to update the value whenever the array element is less than the current 'value'.

So eventually value will contain the minima in the original array.

Elden [556K]2 years ago
3 0

Answer:

value = 0

and every element of array1 is 0.

Explanation:

int[] array1 = new int[25];

Since it is initialized using new keyword.Elements of the array initialized using new are always initialized with 0.So value will become 0 since value of array1[0] is 0 and in the the loop if condition will never gets executed because array1[a] is always 0 that is equal to value.

You might be interested in
Jupiter Inc., a software firm, is starting to face competition from the new entrant in its market, Coral Inc. Jupiter wants to p
Scilla [17]

Answer:

A.

Explanation:

Based on the information provided within the question it can be said that in this scenario, Jupiter's best move would be to adopt the measure of ensuring that customers find its software simpler and more convenient to use than that of Coral. This would create satisfaction among the customers which in term would lead to customer loyalty.

8 0
2 years ago
Compare the memory organization schemes of contiguous memory allocation and paging with respect to the following issues: a. Exte
Free_Kalibri [48]

Answer:

The comparison is based on memory organization schemes of contiguous memory allocation and paging with respect to External fragmentation, Internal fragmentation and Ability to share code across processes.

Explanation:

Memory organization schemes of contiguous memory allocation:

Contiguous memory allocation schemes suffers from external fragmentation. The reason is that address space is distributed contiguously and the holes and gaps keep growing when the old processes die and new processes are introduced. The variable size partition suffers from external fragmentation however the fixed size partitions do not suffer from external fragmentation. Contiguous memory allocation with variable size partitions does not encounter an internal fragmentation but with fixed size partitions suffers from internal fragmentation. Contiguous memory allocation does not support sharing code across processes. This is because the virtual memory segment of a process is not fragmented into non-contiguous fine grained blocks.

Paging:

Paging does not encounter external fragmentation as pages are of the fixed or equal size. So this reduces external fragmentation. However paging suffers from internal fragmentation. This is because a process can request more space or it can request for a less space. When page is allocated to the such a process that page is no longer utilized.This results in internal fragmentation because of the wastage of space even when the page has internal space but cannot be fully utilized. Paging allows to share code across processes.

5 0
2 years ago
Select the correct text in the passage.
sergejj [24]

Answer:

2. Scientists use seismometers to measure the earthquake activity that occurs beneath a volcano. They then predict the eruption of that volcano.

Explanation:

The options are:

1. Before a volcano erupts, earthquake activity beneath the volcano decreases.2. Scientists use seismometers to measure the earthquake activity that occurs beneath a volcano. They then predict the eruption of that volcano.3. When a volcano erupts, the amount of carbon dioxide and sulfur dioxide emitted decreases. 4.Scientists measure the amount of these gases to determine the amount of magma present in the volcanic reservoir.

The answer is certainly 2. as seismometers are being used to find out the details of the earthquake activities which occur inside a volcano. And with this information, the volcanologists then predict the eruption of that particular volcano. Hence, the 2nd option does not have any factual errors, and all the others have factual errors.

5 0
2 years ago
To be a successful computer systems engineer, you must be proficient in programming languages and operating systems. Similarly,
Maslowich

Collectively, skills like the ones listed above are Technical skills. These skills refer to the Knowledge and ability to perform specific tasks. However, Soft skills are also important, because they relate to the ability to interact and communicate effectively with people.

6 0
2 years ago
Read 2 more answers
How can you check an orthographic drawing to be sure there are no missing lines
user100 [1]
With an magnify glass
4 0
2 years ago
Other questions:
  • The tuna marketers' task in the "tunathewonderfish.com" website and related campaign was to ________.
    15·1 answer
  • Explain why companies design products with a planned obsolescence
    14·1 answer
  • The ratio of Chris an iood Dom's ages is
    10·1 answer
  • Given num_rows and num_cols, print a list of all seats in a theater. Rows are numbered, columns lettered, as in 1A or 3E. Print
    7·1 answer
  • Write a split check function that returns the amount that each diner must pay to cover the cost of the meal The function has 4 p
    14·1 answer
  • As a security engineer, compare and contrast the pros and cons of deploying hetero vs homogenous networks. Which costs more? Whi
    6·1 answer
  • George is working with an image in Photoshop. He added a lot of effects to the image. He saved the first draft of the file. The
    6·2 answers
  • It is also called teleconferencing or web conferencing,which is an online meeting wherein two or more people can see,hear,and ta
    14·1 answer
  • You know that you should check the room for security against unwanted entry do you check locks on doors and windows. What else d
    15·1 answer
  • Doug grew up on a large farm in southwest Wisconsin. As a college graduation gift, Doug’s father gave him several hundred acres
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!