Advertisement
Guest User

Untitled

a guest
Mar 1st, 2018
386
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.58 KB | None | 0 0
  1. #include "linkedListArray.h"
  2.  
  3. int main()
  4. {
  5.     struct node* array[MAXPRI] = { NULL };
  6.     //Create(array);
  7.     Push(array, 1, 5);
  8.     Display(array);
  9.  
  10.     Push(array, 2, 4);
  11.     Push(array, 2, 8);
  12.     Push(array, 2, 1);
  13.     Display(array);
  14.  
  15.     Push(array, MAXPRI-2, 9);
  16.     Display(array);
  17.  
  18.     Push(array, MAXPRI-1, 6);
  19.     Display(array);
  20.  
  21.     Execute(array);
  22.     Display(array);
  23.  
  24.     Execute(array);
  25.     Display(array);
  26.  
  27.     printf("Process 1 has priority %d\n", Search(array, 1));
  28.     printf("Process 6 has priority %d\n", Search(array, 6));
  29.  
  30.     return 0;
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement