Question 71
global int i = 100, j = 5;
void P(x)
{
int i = 10;
print(x + 10);
i = 200;
j = 20;
print(x);
}
main()
{
P(i + j);
}
Question 72
global int i = 100, j = 5;
void P(x)
{
int i = 10;
print(x + 10);
i = 200;
j = 20;
print(x);
}
main()
{
P(i + j);
}
Question 73
Class P { void f(int i) { print(i); } } Class Q subclass of P { void f(int i) { print(2*i); } }Now consider the following program fragment:
P x = new Q(); Q y = new Q(); P z = new Q(); x.f(1); ((P)y).f(1); z.f(1);Here ((P)y) denotes a typecast of y to P. The output produced by executing the above program fragment will be
Question 74
Which of the following is NOT an advantage of using shared, dynamically linked libraries as opposed to using statically linked libraries ?
Question 75
Question 76
Question 77
Question 78
Process P: while (1) { W: print \'0\'; print \'0\'; X: } Process Q: while (1) { Y: print \'1\'; print \'1\'; Z: }Synchronization statements can be inserted only at points W, X, Y and Z. Which of the following will always lead to an output starting with \'001100110011\' ?
Question 79
Process P: while (1) { W: print \'0\'; print \'0\'; X: } Process Q: while (1) { Y: print \'1\'; print \'1\'; Z: }Synchronization statements can be inserted only at points W, X, Y and Z Which of the following will ensure that the output string never contains a substring of the form 01^n0 or 10^n1 where n is odd?
Question 80
There are 89 questions to complete.