Languages (3i Infotech Papers): Sample Questions 1 - 2 of 546
Examrace Placement Series prepares you for the toughest placement exams to top companies.
Question number: 1
» Languages » C & C Plus Plus
Write in Short
What is the Hexadecimal equivalent of 3452?
Explanation
Hexadecimal system = base 16
Decimal system = base 10
Here, we are given decimal number 3452. We are asked to find the hexadecimal number of it.
To convert any decimal number into base-n number, we need to divide that number by n.
Dividing 3452 by 16, quotient will be 215 and remainder will be 12, i. e. C
Dividing 215 by 16, quotient will be 13 and remainder will be 7
Diving 13 by 16, quotient will be 0 and remainder will be 13, i. e. D
Reversing the order of remainders we will get the equivalent number of decimal number 3452, which will be D7C.
Question number: 2
» Languages » C & C Plus Plus
Question
What action is taken when the processor under execution is interrupted by a non-maskable interrupt?
Choices
Choice (4) | Response | |
---|---|---|
a. | Processor serves the interrupt request after completing the current task. |
|
b. | Processor serves the interrupt request after completing the execution of the current instruction. |
|
c. | Processor serves the interrupt request immediately. |
|
d. | Processor serving the interrupt request depends upon the priority of the current task under execution. |
|
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.