Answer:
The display will be 17.
Explanation:
Tracing through the program:
At first, math is called and sent 1 and 2 - so 1 is stored to ans1 and 2 is stored to ans2.
If the user inputs 3 for a and 4 for b, the program then calls function math2 and passed values of 3 and 4.
So now inside of math2, 3 is stored to res1 and 4 is stored to res3. Inside of this function, res1 and res2 are added together - so then 7 is stored to d and then returned back to the original function.
So now 7 was stored back to the variable c. Then a and ans1 are added together (3 + 1 = 4) and b and ans2 are added together (4 + 2 = 6). Each of these values are stored back to e and f.
Then those values, e and f (4 and 6) are again sent to math2, which simply adds the values together and returns it back to the function. So 10 is sent back to math and stored to the value of g.
Then c (7) and g (10) are added together and displayed.
Answer:
d) Online, real-time systems.
Explanation:
The options are:
a) Batch processing systems.
b) Personal computer systems.
c) Data compression systems.
d) Online, real-time systems.
And the correct option is D. Online, a real-time system. And this is because it is this which is characterized by the data which is assembled from more than one location as it is online, and various clients from various locations enter the data, and it's updated immediately, as it is a real-time system, which is updated in real-time. And hence D. is the correct option. The data compression system takes the data from one location at a time. The batch processing system is made up of different programs for input, output, and process. and hence is different from real-time, which requires continual all the three. And a PC is not made to a specific function, and it does different activities. Hence, its also not the right option here.
Answer: provided in the explanation segment
Explanation:
taking a step by step process for this, we will analyze this problem,
we have that the Word size = 8 bytes
Cache size = 128 KB = 128×2¹⁰ bytes = 2¹⁷ bytes
(a). we are asked to cal for fully associative mapping with line size of 4 words.
- fully associative mapping with line size of 4 words = 4 × 8 = 32 bytes
- offset = log₂³² = 5 bit
- tag = 32 - (5+0) = 27 bit
- index bit = 0
(b). Direct mapping with the line size of 8 words:
- here the line size = 8×8 = 64 bytes
- no of lines = 2¹⁷/2⁶ = 2¹¹ lines
- offset = log ₂(2⁶) = 6 bit
- index = log ₂(2¹¹) = 11 bit
- tag = 32 - (5 +11) = 15 bit
(c). 2-way set associated mapping with the line size of 1 word:
- no of lines = 2¹⁷/2³ = 2¹⁴ lines
- offset = log₂(2³) = 3 bit
- no of sets = 2¹⁴/2 = 2¹³ sets
- index = log₂(2¹³) = 13 bit
- tag = 32 - (3+13) = 16 bit
(d). 8-way set associated mapping with the line size of 2 words:
8-way set associated mapping with the line size of 2 = 2*8 = 16 bytes
- no of lines = 2¹⁷/2⁴ = 2¹³ lines
- no of sets = 2¹³/2³ = 2¹⁰ sets
- offset = log₂¹⁶ = 4 bit
- index = log ₂(2¹⁰) = 10 bit
- tag = 32 - (4+10) = 18 bit
cheers i hope this helps!!!!
The answer is B I took the quiz and I got it wrong the first time but on the retake I got it right so B