Monday, 25 April 2016

What is numeric promotion ?


Numeric promotion
 is the conversion of a smaller numeric type to a larger numeric type, so that integer and floating-point operations may take place.

In numerical promotion,
  • byte, char, and short values are converted to int values.
  • int values are also converted to long values, if necessary.
  • long and float values are converted to double values, as required.

No comments:

Post a Comment

Note: only a member of this blog may post a comment.