Answer is CPU cache
Explanation: A CPU cache is a special high-speed memory which is smaller and faster, and which helps to store copies of data from main memory location which are often used. It is actually located quite close to the processing core, and is used by the CPU of a computer to save time and energy in accessing data from the main memory.
The way it works is if the processor is either trying to read from or write to a particular location in the main memory, it checks to see if the data from the location is already in a cache, if it is, then it alternatively read from or write to the cache; which faster, instead of the main memory.
Please let me know if this helps.
Answer:
- #include <iostream>
- using namespace std;
- int main()
- {
- // declare and initialize popcorn name array
- string popcorn_name[7] = {"plain", "butter", "caramel", "cheese", "chocolate", "turtle", "zebra"};
- // declare and initialize sales array with 7 elements
- int sales[7];
-
- // A loop to prompt user to enter sales for each popcorn
- for(int i=0; i < 7; i++){
- cout<<"Enter number of sales for " + popcorn_name[i] + " :";
- cin>>sales[i];
- }
-
- // Find maximum sales
- int max = sales[0];
- int maxIndex = 0;
- for(int j=1; j < 7; j++){
- if(max < sales[j]){
- max = sales[j];
- maxIndex = j;
- }
- }
-
- // Find minimum sales
- int min = sales[0];
- int minIndex = 0;
- for(int k=1; k < 7; k++){
- if(min > sales[k]){
- min = sales[k];
- minIndex = k;
- }
- }
-
- // Print popcorn name and sales
- for(int l=0; l < 7 ; l++){
- cout<<popcorn_name[l]<<"\n";
- cout<<"Sales: "<< sales[l]<<"\n\n";
- }
-
- // Print popcorn name with maximum and minimum sales
- cout<<"Highest selling: "<< popcorn_name[maxIndex]<<"\n";
- cout<<"Lowest selling: "<<popcorn_name[minIndex]<<"\n";
- return 0;
- }
Explanation:
Create two arrays to hold the list of popcorn name and their sales (Line 5-8). Next prompt user to input the sales for each popcorn (Line 10-14). Get the maximum sales of the popcorn (Line 17-24) and minimum sales (Line 27-34). Print the popcorn name and sales (Line 37-40) and the popcorn name with highest and lowest selling (Line 43-44).
True; you have treat others the way you want to be treated. It is the golden rule for meeting anyone, whether it's online or in real life. If you were being mean to someone online, would you want someone to be mean to you the same way you were mean to that person? So, the answer is true.
Answer: data design model
Explanation: