First Come First Served (FCFS) is an Operating System process scheduling algorithm. It is non-preemptive in scheduling algorithm. Jobs are executed on first come, first serve basis. It is easy to understand and implement but poor in performance, as average wait time is high. C program is given below to show the implementation of the FCFS process scheduling algorithm.
printf("\nEnter the number of the processes: ");
printf("\nEnter the burst time of the process %d: ",i);
printf("\n\nPROCESS\twaiting time\tburst time\tTurnaround time\n");
printf("\n\nAverage waiting time: %d",avwt);