Question: Basically I have a struct with a few float variables for hold inches data for different things. And I want convert this data to a string for print out.

I want convert for example this float value `"1.50"` to this `"1 f 0.5 inches"` for use in a `print("%s %s", convertToText(node -> data1), convertToText(node -> data2))` or something like that. But I am a bit confused to how implement this in c. So each `"%s"` needs be `"1 f 0.5 in"` but with his data converted.

Answer: 
You could find out the integer, and then calculate the mod of the value.

```
float input;
float decimal;
int integer;

scanf("%f", &input);

decimal = input%;
integer = input - decimal;
printf("%i f %f inches", integer, decimal);

```
```
prtinff("%f", myFloat); 

```

Will print your float directly to STDOUT.

```
char myStr[50];
sprintf(myStr,"%f",myFloat);

```

Will convert a float into a string that you can work with. 

You can use strcat() to join strings. You can use int() to determine the whole parts of a float.