Explanation:
In a 512 byte memory unit, in order to address each byte, there will be 512 locations (each one byte) ranging from 0 to 511.
Thus it will take 9 bits (2^9=512) to store the address within the unit.
<u>Explanation:</u>
An operating system support communication between applications through regions of memory shared between the applications. For example, a computer's RAM (random access memory) allows each running application to use a portion of the computer's memory.
Answer:
B. 1 6 3
Explanation:
Given function definition for calc:
void calc (int a, int& b)
{
int c;
c = a + 2;
a = a * 3;
b = c + a;
}
Function invocation:
x = 1;
y = 2;
z = 3;
calc(x, y);
cout << x << " " << y << " " << z << endl;
- Since x is passed by value, its value remains 1.
- y is passed by reference to the function calc(x,y);
Tracing the function execution:
c=3
a=3
b=c+a = 6;
But b actually corresponds to y. So y=6 after function call.
- Since z is not involved in function call, its value remain 3.
So output: 1 6 3