Category Archives: CPP-Blog

CPP CODE FOR SHORTEST JOB FIRST PREEMPTIVE PRIORITY ALGORITHM

Note: The below program is developed and tested on g++ compiler. To download the source code click here. if you have any doubts then feel free to leave comments below or mail me at iamukt@gmail.com.   #include<iostream> #include<cstdio> using namespace std; typedef struct prpsjf { int at,bt,ft,tat,wt,pr,id; }prpsjf; prpsjf p[20],p1[20],temp; int ts; int accept(); void prpsjfsort(int… Read More »

CPP PROGRAM FOR ROUND ROBIN SCHEDULING ALGORITHM

Note: The following program is written in cpp under linux environment if you are using terminal to compile, then use g++ instead of gcc or cc .if any problem arises or you have any doubt then feel free to leave comments. #include<iostream> #include<cstdlib> #include<queue> #include<cstdio> using namespace std;typedef struct process { int ProcessID,ArrivalTime,BurstTime,StratTime,FinishTime,Priority; float WaitTime,TurnArroundTime; }process;… Read More »

HOW TO CLEAR OR PAUSE OR DELAY CPP’S OUTPUT SCREEN IN UBUNTU

Most of the people who recently moved on from  Turbo CPP’s environment  to ubuntu/GCC environment are facing problems like clearing cpp’s output screen and delaying the output, all of which could be easily done by them in turbo cpp because of the header file conio.h which is not available in ubuntu/GCC environment. But this problem can be… Read More »