-->



HP Placement Paper


1) Which of the following is not associated with operating systems
a) Swapper b) device drivers c) file system d) process management

2) What is the size of virtual memory that must be associated
a) Must be same as physical memory
b)must be > physical memory
c) Can be of any size
d)it must be small enough to allocate process

3) Which of following is true
a) Time sharing is also multi programming
b) Multi programming is also time sharing

4) Global variables are stored at
a) Heap b) Stack c) Data d) Code

5) main( )
{
unsigned int i=3;
while( i !=0)
printf( "%d", i--);
}
How many times will the printf statement be executed?
a)0
b)3
c)4
d)infinite
Ans: infinite loop

6) main( )
{
int x,y, z;
x=2;
y=5;
z= x+++y;
printf("%d %d %d", x, y z);
}
a) 3 5 7

Ans: a

7) # define swap(a,b) temp=a; a=b; b=temp;
main( )
{
int i, j, temp;
i=5;
j=10;
temp=0;
if( i > j)
swap( i, j );
printf( "%d %d %d", i, j, temp);
}