For the following questions answer them individually
In software maintenance tackling the changes in the hardware or software environment where the software works, is
What will be the output of the following C code?
#include <stdio.h>
main( )
{
int i;
for ( i=0; i<5; i++ )
{
int i = 10;
printf ( “ %d”, i );
i++;
}
return 0;
}
What does the following program do when the input is unsigned 16-bit integer?
#include <stdio.h>
main( )
{
unsigned int num;
int i;
scanf (“%u”, &num);
for ( i = 0; i<16; i++)
{
printf (“%d”, (num << i & 1 << 15 ) ? 1:0);
}
}
What is the output of the following program?
#include <stdio.h>
int tmp=20;
main( )
{
printf("%d ",tmp);
func( );
printf("%d ",tmp);
}
func( )
{
static int tmp=10;
printf("%d ",tmp);
}
Which product metric gives the measure of the average length of words and sentence in documents?
Consider a disk system with 100 cylinders. The request to access the cylinders occur in the following sequences
4, 37, 10, 7, 19, 73, 2, 15, 6, 20
Assuming the head is currently at cylinder 50, what is the time taken to satisfy all requests if it takes 1 ms to move from one cylinder to adjacent one and shortest seek time first algorithm is used
A B-Tree used as an index for a large database table has four levels including the root node. If a new key is inserted in this index, then the maximum number of nodes that
could be newly created in the process are
Choose the equivalent prefix form of the following expression
$$\frac{(a + (b − c))* ((d − e)}{(f + g − h))}$$