c float to string

#include <stdio.h>

int main() {
    float floatValue = 123.45;
    char strValue[20];

    sprintf(strValue, "%f", floatValue);

    printf("Float value as string: %s\n", strValue);

    return 0;
}