Question: Consider the following code: for (i = 0; i < 20; i++) for ( j = 0; j < 10; j++) a[i] = a[i]* j

Consider the following code:
for (i = 0; i < 20; i++)
for ( j = 0; j < 10; j++)
a[i] = a[i]* j
a. Give one example of the spatial locality in the code.
b. Give one example of the temporal locality in the code.

Step by Step Solution

3.32 Rating (161 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

a A reference to the first instructio... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Document Format (1 attachment)

Word file Icon

896-C-S-S-A-D (2357).docx

120 KBs Word File

Students Have Also Explored These Related Systems Analysis And Design Questions!