Answer:
The first one I'm sorry if I'm wrong
<h2>Yes the swap method exchange parameter values if passed by reference or the value gets changed inside the function.</h2>
Explanation:
Since the program is not given, I will try to guide you about the mode of parameters.
The meaning of swap is interchanging the values. It can be done by using temporary variable or without using it (if the values are integers).
While passing the parameters, there are two ways, call by value/pass by value and call by reference/ pass by reference.
If call by value, then the value gets swapped only inside the function and will not reflected in the calling portion. Call by reference is other way round.
Answer:
The answer is A
Explanation:
Basically, Shortest job first (SJF) is a scheduling policy that selects jobs on queue for execution within a short execution time.
From the definition of SJF above, it means that there are a lot of process on queue and the (SJF) job is to receive processes on queue to execute within a short execution time.
Therefore, if all the jobs or process arrives at the SJF at the same time, the SJF will forfeit one of its major purpose which is scheduling of jobs.
That will therefore not make Non-preemptive Shortest Job First (SJF) not function at its optimal point.
Answer:
D. The need to slow down more often in life.