Answers

Question and Answer:

  Home  C++ Programmer

⟩ Explain me what is implicit conversion/coercion in c++?

Implicit conversions are performed when a type (say T) is used in a context where a compatible type (Say F) is expected so that the type T will be promoted to type F.

short a = 2000 + 20;

In the above example, variable a will get automatically promoted from short to int. This is called implicit conversion/coercion in c++.

 194 views

More Questions for you: