Answer:
This code will print: 4
Explanation:
Following is the step-by-step explanation for the given code:
- Given is the array of data type double named myList, it has entries, 1, 5, 5, 5,5, 1:
double[] myList = {1, 5, 5, 5, 5, 1};
- Now the first element of the array (1) with index 0 will be stored in the variable max (data type double).
double max = myList[0];
- A variable indexOfMax having datatype int will be initiated as 0.
int indexOfMax = 0;
- Now for loop will be used to find the maximum number of the array. The variable i will be put as index for each element to compare with first element. If the checked element is greater than or equal to the integer in max, it will be replaced. So at the end the variable max will have value 5 that will be at index i = 4.
for (int i = 1; i < myList.length; i++)
{ if (myList[i] >= max)
{ max = myList[i];
- Now the variable i that is the index for max value will be stored in the variable indexOfMax (indexOfMax = 4).
indexOfMax = i; }}
- At end the value stored in variable indexOfMax will be printed, so 4 will be printed as output.
System.out.println(indexOfMax);
i hope it will help you!
Social media, Facebook has become really popularized as has youtube and tumblr. Many people communicate through messenger on facebook, videos on youtube and just posting different things on tumblr. The way people put themselves out into the world, and portray who they are to people across the world is huge change from say 20 years ago.
It is used for cache memory.
Further Explanation:
Cache memory is the memory that stores the instructions and data that is used repeatedly. If the processor wants some data it first looks into cache memory then the processor doesn't has to look into the main memory for the data or instructions which is more time consuming. As the SRAM uses small but a constant source of power, it is usually used for making cache memories. Moreover it is benficial to keep the previously used data in SRAM(Which is faster) than acessing DRAM (Which is way more slow than SRAM.
#LearnwithBrainly
The motherboard contains the central electronic components of the computer.
Answer: 1. False 2. True
Explanation: Piracy in any capacity is in fact illegal and might possibly be a felony I'm not quite sure. But it's just like stealing a toy from the store, somebody worked hard to make it and you best be paying for it.
Software licenses on the other hand usually give you permission to install the software on one or many machines depending on the license you purchase, but usually, if you paid for it once, you can use it anywhere.