Where in the computer is a variable such as "X" stored?

Answers

Answer 1
Answer:

Answer:

The value of "x" is stored at "main memory".

Explanation:

Simply Central processing unit, input device and output device can not store the data.


Related Questions

Write a program that accepts a four digit number, such as 1998, and displays it on number on a line, like: 1 9 9 8 The program should prompt for a four digit number. The program assumes that the user enters the correct information. Provide the java code, including a comment with your name, course code and date.
What suggestions do you have for preventing scope creep in projects?
A device that protects electronic equipment from an increase in power, but not a decrease or outage is a ___.a. Battery backupb. Surge suppressorc. CRTd. UPS
You text file begins with the following rows. The pattern is a description of the item to be repaired, its color, and the issue. bike, red, flat tire bike, blue, broken chain skate, blue, loose wheel mitt, red, torn lace Your program starts with the following lines. import csv aFile = open("data\broken.txt","r") aReader = csv.reader(aFile) countRed = 0 for item in aReader: When you write code to count the number of times red is the color, what is the index of "red"?
In real-world environments, once the domains that are affected by the risks are identified, subsequent next steps would include:______.

Question 4(10pt): sum of the max value found in each row Write a function maxSum that takes two parameters; a 2D integer array with 10 columns, and the number of rows. The function must return the sum of the maximum value from each row.

Answers

Answer:

Following is the program in c++ language  

#include <iostream> // header file

using namespace std; // namespace

int maxSum(int ar[][10],int r) // function definition of  maxsum

{

  int s=0; // varaible declaration

  for(int k=0;k<r;k++)// iterating the loop

  {

      int maximum=ar[k][0]; //finding the maximum value

      for(int k2=0;k2<10;k2++)// iterating the loop

      {

          if(maximum<ar[k][k2]) // check the condition

          {

            maximum=ar[k][k2];   // storing the value in the maximum variable

          }

           }

       s=s+maximum;//adding maximum value to the sum

  }

  return s; // return the sum

}

int main() // main function

{

  int ar[][10]={{5,2,8,-8,9,9,8,-5,-1,-5},{4,1,8,0,10,7,6,1,8,-5}}; // initilaized array

  cout<<"sum of maximum value:";

  int t=maxSum(ar,2); // function calling

  cout<<t; // display the maximum value

}

Output:

sum of maximum value:19

Explanation:

Following are the description of Program  

  • The main method declared and initialized an array ar with the column value 10.
  • After that call the method maxsum .The control will move to the function definition of maxsum.
  • In the function header of maxisum there are two value i.e array "ar" and "r".
  • In this function definition, we adding the maximum value to the sum and return the variable "s".
  • In the main function, we print the value.

Write a java program that use multiple arrays This is a simple array program which does not use an "external class & demo program" If you wish, you may break it down into methods, but that is not required. a. Set up 4 arrays which hold data about 6 items you want to sell: [make them up] int[ ] itemnum int[ ] quantity double[ ] price double[ ] sales b. Set up loops to load the itemnum, quantity and price arrays c. Set up another loop to calculate values for the sales array. [= price * quantity] d. Set up another loop to print the item number and sales amount for each transaction . e. Set up another loop to calculate the total sales of all 6 items f. print the total sales amount

Answers

Answer:

Explanation:

import java.util.Array;

public class Items{

public static void main (String {} args){

// a. Set up 4 arrays which hold data about 6 items you want to sell

int [] itemnum = new int[](1,2,3,4,5,6);

int [] quantity = new int[](500,200,350,100,270,300);

double [] price = new double [](10000, 50000,30000, 22000, 26000,100200);

double[] sales = new double [6];

//b. Set up loops to load the itemnum, quantity and price arrays

for(int I=0;I<6;I++)

{

System.out.println("Item "+itemnum[I]);

System.out.println("Item "+quantity[I]);

System.out.println("Item "+price[I]);

}

//c. Set up another loop to calculate values for the sales array.

for(int j=0;j<6;j++)

{

sales[j] = quantity[j] * price[j];

}

//d. Set up another loop to print the item number and sales amount for each transaction

for(int k=0;k<6;k++)

{

System.out.println("Item Number "+itemnum[k]);

System.out.println("Sales Amount "sales[k]);

}

//e. Set up another loop to calculate the total sales of all 6 items

double totalsales = 0;

for(int l=0;l<6;l++)

{

totalsales+=sales[l];

}

//f. print the total sales amount

System.out.print("Total Sales: "+totalsales);

}

}

Write a statement that assigns total_coins with the sum of nickel_count and dime_count. Sample output for 100 nickels and 200 dimes is: 300

Answers

The statement which gives the sum of nickel and dime is written below :

total_coins = nickel_count + dime_count

The statement required is written using Python 3 :

  • We could write these as a function :

deftotal(nickel_count, dime_count) :

total_coins =dime_count+nickel_count

print(total_coins)

total(100, 200)

#the function total takes in two arguments(number of nickels and number of dimes)

#assigns the varibale total_coins to the sum of nickel_count and dime_count

  • We could also write this in the form of a program which prompts users to enter values :

nickel_count = int(input('Enter count of nickel : '))

# User is prompted to enter number of nickels

dime_count = int(input('Enter count of dime : '))

# User is prompted to enter number of dimes

total_coins = nickel_count + dime_count

#assigns the varibale total_coins to the sum of nickel_count and dime_count

print(total_coins)

#outputs the value of total_coins

Learn more : brainly.com/question/17615351

Answer:

total_coins = nickel_count + dime_count

Explanation:

The statement that performs the operation in the question is total_coins = nickel_count + dime_count

Full Program (Written in Python)

nickel_count = int(input("Nickel Count: "))

dime_count = int(input("Dime Count: "))

total_coins = nickel_count + dime_count

print("Total coins: ",total_coins)

The first two lines prompt user for nickel and dime count respectively

The third line adds the two coins categories together

The last line prints the total count of coins

In this project you will write a set of instructions (algorithm). The two grids below have colored boxes in different locations. You will create instructions to move the colored boxes in grid one to their final location in grid two. Use the
example to help you. The algorithm that you will write should be in everyday language
(no pseudocode or programming language). Write your instructions at the bottom of the
page.
Example: 1. Move
the orange box 2
spaces to the right.
2. Move the green
box one space
down. 3. Move the
green box two
spaces to the left.
Write your instructions. Review the rubric to check your final work.
Rules: All 6 colors (red, green, yellow, pink, blue, purple) must be move to their new location on the grid. Block spaces are
barriers. You cannot move through them or on them – you must move around them

Answers

Answer:

Explanation:

Pink: Down 5 then left 2.

Yellow: Left 3 and down 2.

Green: Right 7, down 4 and left 1.

Purple: Up 6 and left 9.

Red: Left 7, down 5 and left 1.

You can do the last one, blue :)

Answer:

Explanation:

u=up, d=down, r=right, l=left

yellow: l3d2

pink: d5l2

green: r7d4l1

purple: u6l9

red: l7d5l1

blue: r2u7l5

The utilization of a subset of the performance equation as a performance metric is a pitfall. To illustrate this, assume the following two processors. P1 has a clock rate of 4 GHz, average CPI of 0.9, and requires the execution of 5.0E9 instructions. P2 has a clock rate of 3 GHz, an average CPI of 0.75, and requi res the execution of 1.0E9 instructions. One usual fallacy is to consider the computer with the largest clock rate as having the largest performance. Check if this is true for P1 and P2.

Answers

Answer:

Given Data:

Clock rate of P1 = 4 GHz

Clock rate of P2 = 3 GHz

Average CPI of P1 = 0.9

Number of Instructions = 5.0E9 =  5 × 10^9

Clock rate of P2 = 3 GHz

Average CPI of P2 = 0.75

Number of Instructions = 1.0E9 = 10^9

To find: If the computer with largest clock rate has the largest performance?

Explanation:

Solution:

As given in the question, clock rate of P1 = 4 GHz which is greater than clock rate of P2 = 3 GHz

According to the performance equation:

CPU Time = instruction count * average cycles per instruction/ clock rate

CPU Time = I * CPI / clock rate

Where instruction count refers to the number of instructions.

Performance of P1:

CPU Time (P1) = 5 * 10^9 * 0.9 / (4 * 10^9)

                        = 5000000000 * 0.9 / 4000000000

                        = 4500000000 / 4000000000

                        =  1.125s

Performance of P2:

CPU Time (P2) = 10^9 * 0.75/ (3 * 10^9)

                        = 750000000 / 3000000000

                        = 0.25s

So the Performance of P2 is larger than that of P1,

                          performance (P2) > performance (P1)

                                         0.25 is better than 1.125

But clock rate of P1 was larger than P2

                             clock rate of P1 > clock rate of P2

                                                  4 GHz > 3 GHz

So this is a misconception about P1 and P2.

It is not true that computer with the largest clock rate as having the largest performance.

The ____ area on the status bar includes six commands as well as the result of the associated calculation on the right side of the menu.

Answers

Auto Calculate 

The 
Auto Calculate area on the status bar includes six commands as well as the result of the associated calculation on the right side of the menu.

Hope This Helps :)

P.S
If you would make me as brainiest that would be great! :D