Define implicit cast and explicit cast.Implicit cast:
- It allows conversion without any loss of data. - It takes place only when there is no possible of loss of data. - It does not require a casting operator. - It is used when converting data from derived types of the base type.
Explicit cast:
- When there is any possibility of loss of data, explicit cast is required. - Explicit cast if not applied properly can result a loss of data precision. - It requires casting operator. - It is used when converting a base type or a derived type.
|