implicit casting
Implicit casting, also known as automatic type conversion, occurs when a programming language automatically converts one data type to another without explicit instructions from the programmer. This typically happens when a value of a smaller data type, like an int, is assigned to a larger data type, such as a float. The conversion is done to prevent data loss and ensure that the value fits within the new type's range.
For example, if you add an int and a float, the int will be implicitly cast to a float to perform the operation. This process helps maintain compatibility between different data types, allowing for smoother calculations and operations in programming.