C++ - Explicit conversion to 32-bit real number

The required type conversion can be carried out as follows:

explicit conversion to 32-bit real number

Description

( type ) expression

Input


Output

Note: In C like languages the data type size may be different depending on compiler and architecture, we show only one standard look.
Compatible programing languages:
Visual C++ .NET

Examples

C++

Explicit conversion to 32-bit real number the possible of use:
float x = 3.14159265359;  // x = 3.14159274
float y = 123456789;      // y = 123456792.0
y =(float)(x * y);       // z = 387850976.0

C++

Other pieces of example codes:
(float)y / 5
(float)x / 5
(float)50 / i
(float)i / 0xab
(float)64 / 8
(float)x / 0xa

You can find it in the following collections: explicit type conversions
Languages: en hu cz sk