Consider contiguous allocation of physical memory to processes using variable partitioning scheme. Suppose there are 8 holes in the memory of sizes $20 \mathrm{~KB}, 4 \mathrm{~KB}$, $25 \mathrm{~KB}, 18 \mathrm{~KB}, 7 \mathrm{~KB}, 9 \mathrm{~KB}, 15 \mathrm{~KB}$, and 12 KB . Assume that no two holes are adjacent. Two processes P1 of size 16 KB and P2 of size 9 KB arrive in that order, and they are allocated memory using the best-fit technique. After allocating space to P1 and P2, the number of holes of size less than 8 KB is $\_\_\_\_$ . (answer in integer)
Note: $1 \mathrm{~K}=2^{10}$
In C runtime environment, which one of the following is stored in heap?
$$\text { Consider the following three ANSI-C programs, P1, P2 and P3 }$$
Which one of the following statements is true?
Consider the following ANSI-C program.
#include <stdio.h>
int main( ) {
int *ptr, a, b, c;
a=5; b=11; c=20;
ptr=&a; *ptr=c; ptr=&c;
a=*(&b); c=*ptr-a;
printf("%d",c);
return(0);
}
The output of this program is $\_\_\_\_$ . (answer in integer)
Note: Assume that the program compiles and runs successfully.
GATE CSE Papers
All year-wise previous year question papers