Question 41
Question 42
Program P1() { x = 10; y = 3; func1(y,x,x); print x; print y; } func1(x,y,z) { y = y+4; z = x+y+z; }
Question 43
[PI] int * g (void)
{
int x= 10;
return (&x);
}
[P2] int * g (void)
{
int * px;
*px= 10;
return px;
}
[P3] int *g (void)
{
int *px;
px = (int *) malloc (sizeof(int));
*px= 10;
return px;
}
Question 44
Program P2
var n: int:
procedure W(var x: int)
begin
x=x+1;
print x;
end
procedure D
begin
var n: int;
n=3;
W(n);
end
begin //beginP2
n=10;
D;
end
Question 46
Consider a machine with 64 MB physical memory and a 32-bit virtual address space. If the page size is 4KB, what is the approximate size of the page table?
Question 47
repeat flag [i] = true; turn = j; while ( P ) do no-op; Enter critical section, perform actions, then exit critical section flag [ i ] = false; Perform other non-critical section actions. until false;For the program to guarantee mutual exclusion, the predicate P in the while loop should be.
Question 48
Question 50
create table geq ( ib integer not null ub integer not null primary key 1b foreign key (ub) references geq on delete cascade )Which of the following is possible if a tuple (x,y) is deleted?
There are 50 questions to complete.