For the following questions answer them individually
Consider the following C++ program
int a (int m)
{ return ++m; }
int b(int&m)
{ return ++m;}
intc(char &m)
{ return ++m; }
void main ()
{
int p = 0, q = 0,r = 0;
p += a(b(p)) ;
q += b(a(q));
r += a(c(r)) ;
cout<< p << q << r;
}
Assuming the required header files are already included, the above program
A particular parallel program computation requires 100 sec when executed on single processor. If 40% of this computation is inherently sequential (i.e. will not benefit from additional processors), then theoretically best possible elapsed times of this program running with 2 and 4 processors, respectively, are
Consider the following C code segment
int f (int x)
{
if (x < 1) return 1;
else return (f(x - 1) + g(x));
}
int g (int x)
{
if(x < 2) return 2;
else return (f(x - 1) + g(x/2));
}
Of the following, which best describes the growth of f(x) as a function of x ?
For a multi-processor architecture, In which protocol a write transaction is forwarded to only those processorsthat are known to possess a copy of newly altered cache line ?
Given a binary-max heap. The elementsare stored in an arrays 25 25. 14. 16, 13, 10, 8 12. What is the content of the array after two delete operations?
What is the outputof the following program?
main(){
int x = 2, y = 5;
if(x < y) return (x = x + y);
else printf("z1");
prinf("z2");
}
The Operating System of a computer may periodically collect all the free memory space to form contiguous block of free space. This is called
Consider the following program
main()
{
int x = 1;
printf("%d",(*char(char*)&x));
}
Assuming required header files are included and if the machine in which this program is executed is littleendian, then the output will be