C++ Programmer Question:
Download Questions PDF

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

C++ Programmer Interview Question
C++ Programmer Interview Question

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++.

Download C++ Programmer Interview Questions And Answers PDF

Previous QuestionNext Question
Explain me what is virtual destructors? Why they are used?Explain void* realloc (void* ptr, size_t size)?