SHARE
TWEET

Untitled

a guest Mar 1st, 2018 147 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top