For the following questions answer them individually
Consider a disk pack with 16 surfaces, 128 tracks per surface and 256 sectors per track. 512 bytes of data are stored in a bit serial fashion in a sector. The capacity of the disk pack and the numberofbits required to specify a particular sector in the disk respectively
Let the page fault service time be 10 ms in a computer with average memory access time being 20 ns. If one page fault is generated for every $$10^{6}$$ memory accesses, what is the effective access time for the memory?
What will be output of following program? Assume that you are running this program in little-endian processor.
#include<stdio.h>
int main() {
short a = 320;
char *ptr;
ptr = (char *)&a;
printf("%d"_,*ptr);
return 0;
}
Consider the following segment of C code
int j, n;
j =1;
while $$(j \leq n)$$
j=j*2;
The number of comparisons madein the execution of the loop for any n > 0 is
The following postfix expression with single digit operands is evaluated using a stack
8 2 3 ^ / 2 3 * 5 1 * -
(Note that ^ is the exponential operator)
The top two elements of the stack after the first * operator is evaluated are
Average number of comparison required for a successful search for sequential search on ‘n’ items is
A Hash Function f is defined as f(key) = key mod 7. With linear probing, while inserting the keys 37, 38, 72, 48, 98, 11, 56 into a table indexed from 0, in which location the key 11 will be stored (count table Index 0 as $$0^{th}$$ location )?