#include<stdio.h>
int main( )
{
int n, i, j, b[ 20 ] , sb[ 20 ] , t[ 20 ] , x, c[ 20 ] [ 20 ] ;
for ( i= 0 ; i< n; i++ )
{
printf ( "Enter no. of blocks occupied by file%d" , i
+ 1 ) ; printf ( "Enter the starting block of file%d" , i
+ 1 ) ; t[ i] = sb[ i] ;
for ( j= 0 ; j< b[ i] ; j++ ) {
c[ i] [ j] = sb[ i] ++;
}
printf ( "Filename\t Start block\t length\n " ) ; for ( i= 0 ; i< n; i++ )
printf ( "%d\t %d \t %d\n " , i
+ 1 , t
[ i
] , b
[ i
] ) ;
printf ( "length is:%d" , b
[ x
- 1 ] ) ; for ( i= 0 ; i< b[ x- 1 ] ; i++ )
}
I2luY2x1ZGU8c3RkaW8uaD4gCmludCBtYWluKCkgCnsgCiBpbnQgbixpLGosYlsyMF0sc2JbMjBdLHRbMjBdLHgsY1syMF1bMjBdOyAKIHByaW50ZigiRW50ZXIgbm8ub2YgZmlsZXM6Iik7IAogc2NhbmYoIiVkIiwmbik7IAogZm9yKGk9MDtpPG47aSsrKSAKIHsgCiBwcmludGYoIkVudGVyIG5vLiBvZiBibG9ja3Mgb2NjdXBpZWQgYnkgZmlsZSVkIixpKzEpOyAKIHNjYW5mKCIlZCIsJmJbaV0pOyAKIHByaW50ZigiRW50ZXIgdGhlIHN0YXJ0aW5nIGJsb2NrIG9mIGZpbGUlZCIsaSsxKTsgCiBzY2FuZigiJWQiLCZzYltpXSk7IAogdFtpXT1zYltpXTsKcHJpbnRmKCJcbiBhYmMiKTsKIGZvcihqPTA7ajxiW2ldO2orKykgewogY1tpXVtqXT1zYltpXSsrOyAKIApwcmludGYoIiVkICIsY1tpXVtqXSk7fQpwcmludGYoIlxuIik7CiB9IAogcHJpbnRmKCJGaWxlbmFtZVx0U3RhcnQgYmxvY2tcdGxlbmd0aFxuIik7IAogZm9yKGk9MDtpPG47aSsrKSAKIHByaW50ZigiJWRcdCAlZCBcdCVkXG4iLGkrMSx0W2ldLGJbaV0pOwpwcmludGYoIkVudGVyIGZpbGUgbmFtZToiKTsgCgogc2NhbmYoIiVkIiwmeCk7IAoKIHByaW50ZigibGVuZ3RoIGlzOiVkIixiW3gtMV0pOyAKIHByaW50ZigiYmxvY2tzIG9jY3VwaWVkOiIpOyAKIGZvcihpPTA7aTxiW3gtMV07aSsrKSAKIHByaW50ZigiJWQgIixjW2ldW3gtMV0pOyAKfQ==