Advertisement
Tusohian

[Fix Needed] Memory Management in C Programming

Nov 28th, 2018
415
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3.  
  4. int main ()
  5. {
  6.     int bn, i, blk[100], fn, file[100];
  7.  
  8.     printf("Enter the number of blocks: ");
  9.     scanf("%d",&bn);
  10.  
  11.  
  12.      printf("\nEnter the block size of every blocks: \n");
  13.      for(i=1; i<=bn; i++)
  14.      {
  15.          printf("Block %d : ", i);
  16.          scanf("%d", &blk[i]);
  17.      }
  18.  
  19.      printf("Enter the number of files: ");
  20.      scanf("%d",&fn);
  21.  
  22.  
  23.      printf("\nEnter the file size of every files: \n");
  24.      for(i=1; i<=fn; i++)
  25.      {
  26.          printf("\n File %d : ", i);
  27.          scanf("%d", &file[i]);
  28.      }
  29.  
  30.  
  31.      if(file[i]<=block[i])
  32.      {
  33.  
  34.  
  35.  
  36.      }
  37.  
  38.  
  39.  
  40.  
  41. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement