41. Loop unrolling is a code optimization technique:
(A) that avoids tests at every iteration of the loop
(B) that improves performance by decreasing the number of instructions in a basic block.
(C) that exchanges inner loops with outer loops
(D) that reorders operations to allow multiple computations to happen in parallel.
Answer: A
Explanation:
Loop unrolling is a compiler optimization applied to certain kinds of loops to reduce the frequency of branches and loop maintenance instructions. It is easily applied to sequential array processing loops where the number of iterations is known prior to execution of the loop.
The general idea of loop unrolling is to replicate the code inside a loop body a number of times. The number of copies is called the loop unrolling factor. The number of iterations is divided by the loop unrolling factor.
- What will be the hexadecimal value in the register ax (32-bit) after executing the following instructions?
Mov al, 15
Mov ah, 15
Xor al, al
Mov cl, 3
Codes:
(A) 0F00 h (B) 0F0F h
(C) 01E0 h (D) FFFF h
Answer: C
- Which of the following statements is false?
(A) Top-down parsers are LL parsers where first L stands for left-to-right scan and second L stands for a leftmost derivation.
(B) (000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string.
(C) Bottom-up parsers are in the LR family, where L stands for left-to-right scan and R stands for rightmost derivation
(D) The class of context-free languages is closed under reversal. That is, if L is any context-free language, then the language LR={WR:wϵL} is context free.
Answer: B
- System calls are usually invoked by using:
(A) A privileged instruction (B) An indirect jump
(C) A software interrupt (D) Polling
Answer: C
- The …………… transfers the executable image of a C++ program from hard disk to main memory.
(A) Compiler (B) Linker
(C) Debugger (D) Loader
Answer: D
- In software testing, how the error, fault and failure are related to each other?
(A) Error leads to failure but fault is not related to error and failure
(B) Fault leads to failure but error is not related to fault and failure
(C) Error leads to fault and fault leads to failure
(D) Fault leads to error and error leads to failure
Answer: C
- Which of the following is not a software process model?
(A) Prototyping (B) Iterative
(C) Timeboxing (D) Glassboxing
Answer: D
- How many solutions are there for the equation x+y+z+u=29 subject to the constraints that x≥1, y≥2, z≥3 and u≥0?
(A) 4960 (B) 2600
(C) 23751 (D) 8855
Answer: B
- A unix file system has 1-KB blocks and 4-byte disk addresses. What is the maximum file size if i-nodes contain 10 direct entries and one single, double and triple indirect entry each?
(A) 32 GB (B) 64 GB
(C) 16 GB (D) 1 GB
Answer: C
Explanation:
block = 210
block pointer size = 4B
entries possible in block = 210/22 = 256
direct pointer gives = 10 * 256/256 = 10 blocks
single indirect gives = 256 * 256 /256= 28 blocks
double indirect gives = 256 * 256 * 256 /256= 216 blocks
triple indirect gives = 256 * 256 * 256 * 256 /256= 224 blocks
total = 10 blocks + 28 blocks + 216 blocks + 224 blocks
= 16843018 blocks = 16843018 * 1024 = 17247250432 ≈ 16 GB
- …………….. uses electronic means to transfer funds directly from one account to another rather than by cheque or cash?
(A) M-Banking (B) E-Banking
(C) O-Banking (D) C-Banking
Answer: B