Google is a wonderful thing. It will reveal the correct syntax for using sprintf() which your code does does not do
sprintf()