static_cast: Definition: Performs conversions between related types, such as numeric types, pointers, and references, that are known at compile-time. Usage: Used for casting numeric types to other numeric types, upcasting and downcasting in inheritance hierarchies, and converting pointers/references within a class hierarchy. // Casting numeric types
int num = 10;
double doubleNum…