What is binary numeric promotion states?

Binary numeric promotion implicitly applies appropriate widening primitive conversions so that a pair of operands have the broadest numeric type of the two, which is always at least int. Given T to be the broadest numeric type of the two operands, the operands are promoted as follows under binary numeric promotion.


If T is broader than int, both operands are converted to T; otherwise, both operands are converted to int.


This means that byte, short, and char are always converted to int at least.



Questions by sujatham   answers by sujatham

 

This Question is not yet answered!

 
 

Related Answered Questions

 

Related Open Questions