Machine-translated by Google. Questions are authored in English.
Top

Discussion

In compiler design 'reducing the strength' refers to

  • A.reducing the range of values of input variables.
  • B.code optimization using cheaper machine instructions.
  • C.reducing efficiency of program.
  • D.None of the above

Answer: B

Reducing the strength in a compiler means replacing an expensive operation with a cheaper machine instruction, for example replacing a multiplication by 2 with a shift or an addition, or a multiplication inside a loop by a repeated addition. It is therefore a code optimization using cheaper machine instructions.

It has nothing to do with reducing the range of the input values, and it is the opposite of reducing the efficiency of the program, since its purpose is to make the generated code faster. So the other options are wrong.

No comment is present. Be the first to comment.
Loading…

Post your comment

Please log in or register to post a comment.