C - Explicit type conversion
Revision as of 09:30, 23 June 2015 by Jshankar (1 revision imported: EdWiki -- Emsys pages from Shukra)
Explicit type conversion
- Explicit type conversion is forced by the programmer, where automatic type conversion cannot be done by the compiler.
float f1, f2; int i = 10; f1 = f2 = 20.713489; i = (int)(f1 + f2); // The sum of f1 and f2 is explicitly converted to an int.