C convert floating point to int August 11, 2023 by Tarik my_var = (int)my_var; As simple as that. Basically you don’t need it if the variable is int.