Question: Can you explain this code to me in C language please? counter = 0; } if(i == limit - 1) { i = 0; }

Can you explain this code to me in C language please?

counter = 0; } if(i == limit - 1) { i = 0; } else if(P[i + 1].arrivalTime <= total) { i++; } else { i = 0; } } for (i = 0; i < limit; i++) { totalWaitTime += P[i].waitTime; totalResponseTime += P[i].responseTime; totalBurstTime += P[i].burstTime; } printf(" Response time:"); for (i = 0; i < limit; i++) { printf("%d ", P[i].responseTime); }

printf(" Throughput:%f", (float)totalBurstTime / (float)limit ); printf(" Average waiting time:%f", (float)totalWaitTime / (float)limit); return 0;

}

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!