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

Discussion

An implicit conversion inserted by the compiler where an integer is used in a floating point context is called

  • A.a promotion of the operator to a higher precedence level
  • B.an overload resolution among the candidate operator definitions
  • C.a reduction performed by the parser during a bottom up parse
  • D.a coercion

Answer: D

Coercion is the automatic conversion of one type to another where the language permits it. Semantic analysis detects the mismatch and inserts an explicit conversion node into the tree so later phases see a consistent type.

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

Post your comment

Please log in or register to post a comment.