TCS Placement: Sample Questions 441 - 443 of 502

Get unlimited access to the best preparation resource for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 441

Write in Short

Short Answer▾

rd of a number is 3 more than the th of a number then find the number?


Let the required number be x.

rd of number is 3 more than th of number, i.e..

So, required number is 18.

Question 442



Cout is a/an ________.


Choice (4)












  • In most environments, standard output is on screen- C ++ stream object defined to access this standard output is cout. Cout is an object which encapsulates the complexity of outputting to the screen.
  • For formatted output operations, cout is used together with the insertion operator, which is written as << (i.e.. , two “less than” signs) .
Given the Image is Define the Output Using Cout Object

Question 443


Describe in Detail


What are shore, long and medium-term scheduling?


    • Long Term Scheduler
    • Long term scheduler determines which programs are admitted to the system for processing.
    • It controls the degree of multiprogramming.
    • It is also called a job scheduler.
    • A long-term scheduler determines which programs are admitted to the system for processing.
    • It selects processes from the queue and loads them into memory for execution.
    • Process loads into the memory for CPU scheduling.
  • Medium Term Scheduler
    • Medium term scheduling is part of the swapping function.
    • This relates to processes that are in a blocked or suspended state.
    • They are swapped out of real-memory until they are ready to execute.
    • The swapping-in decision is based on memory-management criteria.
    • It removes the processes from the memory.
  • It reduces the degree of multiprogramming.
  • The medium-term scheduler is in-charge of handling the swapped out-processes.
  • A running process may become suspended if it makes an I/O request.
  • Suspended processes cannot make any progress towards completion.
  • In this condition, to remove the process from memory and make space for other processes, the suspended process is moved to the secondary storage.
  • This process is called swapping, and the process is said to be swapped out or rolled out.
  • Swapping may be necessary to improve the process mix.
  • Short Term Scheduler
  • Short term scheduler, also known as a dispatcher executes most frequently, and makes the finest-grained decision of which process should execute next.
  • This scheduler is invoked whenever an event occurs.
  • It may lead to interruption of one process by preemption.
  • It is also called as CPU scheduler.
  • Its main objective is to increase system performance in accordance with the chosen set of criteria.
  • It is the change of ready state to running state of the process.
  • CPU scheduler selects a process among the processes that are ready to execute and allocates CPU to one of them.
  • Short-term schedulers, also known as dispatchers, make the decision of which process to execute next.
  • Short-term schedulers are faster than long-term schedulers.
Given the Image is Define the Shore, Long and Medium-Term Scheduling

Developed by: