Languages-C & C Plus Plus [3i Infotech Placement]: Sample Questions 70 - 71 of 354

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

Question 70

C & C Plus Plus
Edit

Write in Short

Short Answer▾

Which one is equivalent is multiplying by 2: left shifting a number by 1 or left shifting an unsigned int or char by 1?

Explanation

  • Left shifting by 1 is multiplying by 2.
  • Right shifting by 1 is dividing by 2.

Question 71

C & C Plus Plus

Question

MCQ▾

What action is taken when the processor under execution is interrupted by a non-maskable interrupt?

Choices

Choice (4)

a.

Processor serves the interrupt request after completing the execution of the current instruction.

b.

Processor serving the interrupt request depends upon the priority of the current task under execution.

c.

Processor serves the interrupt request immediately.

d.

Processor serves the interrupt request after completing the current task.

Answer

c.

Explanation

All the regular interrupts are called maskable interrupts. The processor is able to mask, or temporarily ignore, any interrupt if it needs to, in order to finish something else that it is doing. In addition, however, the PC has a non-maskable interrupt (NMI) that can be used for serious conditions that demand the processor՚s immediate attention. The Non-Maskable Interrupt cannot be ignored by the system unless it is shut off specifically.

Developed by: