C++ Programmer Question:
Explain me what is implicit conversion/coercion in c++?

Answer:
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++.
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++.
Previous Question | Next Question |
Explain me what is virtual destructors? Why they are used? | Explain void* realloc (void* ptr, size_t size)? |