Question: #include #include /* Define structures and global constants, including: the pcb type, the children linked list type, the maximum number of processes*/ /***************************************************************/ void PROCEDURE
#include
/* set variable q to current node's process index field */ /* call self on children of PCB[q] */ /* free memory of PCB[q] and set PCB[q] to NULL*/ /* free memory of paramter and set to NULL */ return; } /* end of procedure */ /***************************************************************/ void "PROCEDURE FOR OPTION #3"() { /* declare local vars */ /* prompt for process index p */ /* call recursive procedure to destroy children of PCB[p] */ /* reset children of PCB[p] to NULL */ /* print hierarchy of processes */ return; } /* end of procedure */ /***************************************************************/ void "PROCEDURE FOR OPTION #4"() { /* if PCB[0] is non null) /* if children of PCB[0] is not null */ /* call recursive procedure to destroy children of PCB[0] */ /* free memory of all PCB's */ return; } /* end of procedure */ /***************************************************************/ int main() { /* declare local vars */ /* while user has not chosen to quit */ /* print menu of options */ /* prompt for menu selection */ /* call appropriate procedure based on choice--use switch statement or series of if, else if, else statements */ return 1; /* indicates success */ } /* end of procedure */
CAN SOMEONE CODE THIS IN C TEST case are 1 2 2 2 2 3 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
