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
slava [35]
3 years ago
9

In this exercise we look at memory locality properties of matrix computation. Th e following code is written in C, where element

s within the same row are stored contiguously. Assume each word is a 32-bit integer.
for (I=0; I<8; I++)
for (J=0; J<8000; J++)
A[I][J]=B[I][0]+A[J][I];
References to which variables exhibit temporal locality?
Computers and Technology
1 answer:
Sonja [21]3 years ago
4 0

Answer:

Explanation:

temporal locality can be defined as: when a particular memory  is referenced or accessed several times  within a specific period of time. In the question, i think the variable that exhibit temporal locality are I, J and 0(all the variable). This is because the variable J and 0 are accessed several times within the loop. I would not have been part of it, but in the A[I][J]=B[I][0]+A[J][I], the variable "I" is also accessed in the addition. this is why it is part of the temporal locality.

You might be interested in
Question 1: An acronym is a word formed by taking the first letters of the words in a phrase and making a word from them. For ex
jeka94

Answer:

See explaination

Explanation:

def main():

phrase = input('please enter a phrase: ')

acronym = ''

for word in phrase.split():

acronym += word[0].upper()

print('Acronym for ' + phrase + ' is ' + acronym)

main()

See attachment for the output

5 0
4 years ago
Write a C++ program using a do while loop for (Find the highest score). The program should work for any number of students. Run
alexdok [17]

Answer:

  1. #include <iostream>
  2. using namespace std;
  3. int main()
  4. {
  5.    int highest = 0;
  6.    int score;  
  7.    do{
  8.        cout<<"Input a score: ";
  9.        cin>>score;
  10.        
  11.        if(score > highest){
  12.            highest = score;
  13.        }    
  14.    }while(score >= 0);
  15.    
  16.    cout<<highest;
  17.    return 0;
  18. }

Explanation:

Firstly, create a variable highest and initialize it with zero (Line 5). Next, create a do while loop (Line 7 - 14). Within the loop prompt user to input a score (Line 8-9) and if the current score is higher than the highest variable, assign the score to highest variable (Line 11 - 13).

After finishing the loop when user put in any negative value, the program shall be able to print out the highest input score (Line 16).

8 0
3 years ago
The given SQL creates a Movie table with an auto-incrementing ID column. Write a single INSERT statement immediately after the C
Snowcat [4.5K]

Answer:

INSERT INTO Movie(Title,Rating,ReleaseDate)

VALUES("Raiders of the Lost ArkPG",'PG',DATE '1981-06-15'),

("The Godfaher",'R',DATE '1972-03-24'),

("The Pursuit of Happyness",'PG-13',DATE '2006-12-15');

Explanation:

The SQL statement uses the "INSERT" clause to added data to the movie table. It uses the single insert statement to add multiple movies by separating the movies in a comma and their details in parenthesis.

3 0
3 years ago
4.2 code need help plz someone 15 points if u help
Korolek [52]

def func():  

 total = 0

 while True:

   pet = input("What pet do you have? ")

   if pet == "rock":

     return

   total += 1

   print("You have a {} with a total of {} pet(s)".format(pet, total))

func()

We wrapped our code in a function so that whenever the user enters rock, we can simply return and exit the function. If you have any other questions, I'll do my best to answer them.

8 0
4 years ago
which of the following would help a new administrator quickly determine if a network has a vlan for its publicly accessible serv
Alexxx [7]

Answer:

Logical Network Diagrams.

Explanation:

Network Diagrams is the visual diagram that represents the networking of telecommunications and computer. <u>There are two types of network diagrams- Physical and Logical.</u>

Logical Network Diagram represents the information that flows through a network. The diagrams shown in the logical network diagram are routers and firewalls, VLAN Ids, IP address, traffic flow, etc. Logical Network Diagram is helpful in troubleshooting.

<u>Logical Network Diagram helps in determining whether a network has VLAN for public assessing or not</u>.

So, the correct answer is the Logical Network Diagram.

3 0
3 years ago
Other questions:
  • How to analyze time complexity of a code?
    5·1 answer
  • Select the correct answer.
    7·1 answer
  • Which type of security personnel may work for government as well as for private security agencies?
    7·2 answers
  • Neighbor discovery performs many of the functions that icmp router discovery and icmp ____ handled in ipv4.
    13·1 answer
  • Given input characters for an arrowhead and arrow body, print a right-facing arrow. Ex: If the input is: *
    14·1 answer
  • Alter the line of (10, 20) and (18, 30) en dpoints by (2, 3) scale factor, then move it by (5, 9) translate factor using matrix
    13·1 answer
  • You have a workstation running windows vista business that you would like to upgrade to windows 7 ultimate. you want to perform
    11·1 answer
  • What term is used to describe the harassment of computer users through various forms of internet communications?
    5·1 answer
  • In this line of code, what does 144 refer to?
    12·1 answer
  • The Internet:
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!