Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR C

Convert a Floating-point value to an Integer in C

float my_float = 42.8f;
int my_int;
my_int = (int)my_float;          // => my_int=42
 
PREVIOUS NEXT
Tagged: #Convert #Integer #C
ADD COMMENT
Topic
Name
6+2 =