Languages [3i Infotech Placement]: Sample Questions 188 - 189 of 546

Glide to success with Doorsteptutor material for competitive exams : get questions, notes, tests, video lectures and more- for all subjects of your exam.

Question 188

Edit

Describe in Detail

Essay▾

What do you mean by wait state? Why is it needed?

Explanation

  • A wait state is the delay experienced by a microprocessor when accessing external memory or another device that is slow to respond.
  • Similarly to access slow memory the microprocessor must be able to delay the transfer until the memory access is complete.
  • Some microprocessors provide a special control input called READY to allow the memory to set its own memory cycle time- controlling the processor cycle.
  • After sending an address out, the microprocessor waits until it receives a READY input from memory- it enters a wait state for as long as READY line is in 0 state.
  • When the memory access is complete, the READY goes high to indicate that the memory is ready for specified transfer.

Question 189

Edit

Describe in Detail

Essay▾

What is virtual class and friend class?

Explanation

Virtual Base Class:

  • Used in context of multiple inheritance in C ++ .
  • Used to derive two classes from a class, and further derive one class from the two classes in the second level (diamond hierarchy) .
  • We need to declare the uppermost base class as ‘virtual’ in the inherited classes (so that methods inherited from both class are implemented) .
  • This prevents multiple copies of the uppermost base class data members when an object of the class at the third level of hierarchy is created.

Friend class:

  • Friend class has complete access to data and methods including private and protected data methods.
  • It is not bi-directional-
  • If A declares B as its friend, it does not mean that A can access private data of B.
  • B can access all data of A.

Developed by: