Question: Q3) Write a program that reads integer numbers, inserts them into a queue. Then copy the prime numbers in this queue into a stack without

Q3) Write a program that reads integer numbers, inserts them into a queue. Then copy the prime numbers in this queue into a stack without destroying the contents of the queue. The program should print the contents of the stack and the queue. Q2) Write a program stores information of processes into a singly linked list such that: 1. Each node in the link list represents one process. 2. Process information is Process ID and Process Name. 3. The user inserts process information while the program is running using the following command: create Process_ID Process_Name For example: if the user writes in console create 342 word a node will be create and inserted into the linked list. 4. The nodes of the linked list should be sorted by Process ID. 5. The user can terminate a process (deleting its corresponding node from the list) by write a command: kill Process_ID For example: if the user writes in console kill 342 this means if a process with ID 342 exists its node will be deleted from the list. 6. The user can print the information stored in the list by writing command: show. 7. A process with a duplicate ID should not be inserted into the list
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
