175k views
5 votes
g Assume that this program is run on a processor with data cache of size big enough that the entire array arr can fit in the cache. (a) How many paths does the function foo of this program have

1 Answer

3 votes

Answer:

A. 2

Step-by-step explanation:

The food function in the C source code uses two for loop statements to fill and array of size 100 with 100 values ranging from 1 to 100 and the second to get the total sum to the values in the array. With this, two program paths are created.

User Nikeaa
by
5.5k points