Answers for "string to float int in c"

C
5

convert string to float c

char myString = "6.88";
float x = atof(myString);
//x is now 6.88
Posted by: Guest on February-20-2020
-2

c float to int

# you can cast in c like so
float my_float= 1.446;
int my_int = (int) my_float;
Posted by: Guest on May-29-2020

Code answers related to "C"

Browse Popular Code Answers by Language