|
|
|
|
|
Future
Soft Placement Paper-2 |
1.Access time of a drum of
4000rpm?
2.Allocation units for Automatic, Global and Static
variables.
a) Stack, Heap, Heap
b) Heap, Stack, Heap
c) Stack, Heap, Stack
3.Where are the automatic variables stored and when it
is removed?
4.FUNC(x,y) John Jacob
John->main function
Jacob->FUNC(x,y)
a) No of times the FUNC is called
b) Place where the FUNC is called
c) Type of return value
d) Type of actual parameters
e) Type of formal parameters
5.Whats the string represented by the DFA
6. Hardware is used in memory
management
for reallocation
ans c)To reduce execution time.
7. Question using macros something like this logic:
int a[10]={60,57,10,5,4,3,2,8,9};
main( )
{
int varx,vary;
for (i=0;i<10;i++)
{
if(varx<a[i])
{
vary=varx;
varx=a[1];
}
else if (vary<a[i])
{
varx=vary;
vary=a[i];
}
printf(%d%d,varx,vary);
}
8.
print(int (*) ( ));
int a=40;
void main( )
{
print(fn( ));
print(fn( ));
}
print(int (*fn)( ))
{
printf(%d,fn( ));
printf(%d,fn( ));
}
int fn( )
{
/*static int i=15*/
return (i-=5);
}
|
|
| |
| |
|
|
|
|
|
|
|
|
|
|
|