scan_disk_scheduling_code
scan_disk_scheduling_code
h>
void main(){
printf("DISK SCHEDULING - SCAN\n");
int n, i, max, p;
printf("Enter the disk track limit(max): ");
scanf("%d", &max);
printf("Enter the number of requests: ");
scanf("%d", &n);
printf("Enter the requests \n");
int arr[n];
for(i = 0; i < n; i++){
scanf("%d", &arr[i]);
}
printf("Enter the current position of disk arm: ");
scanf("%d", &p);
scan(arr, n, p, max);
}