sprintf help needed - dynamic creation

After reading my code again and again to try to understand what part you don't I am still uncertain.

If I rewrite the statement to the following, does it make any more sense?

char foo[48];
String stringvar1 = "test1";
String stringvar2 = "test2";
float floatvar = 1.23456;

sprintf(foo, "%s,$s,%1.1f", stringvar1, stringvar2, floatvar1);