char array[sizeof("12.34")];

sprintf(array, "%.2f", floatnum);