Don't do that. Not only is it a useless use of sprintf, but it is also an abuse of sprintf, whose 1st argument should be a format specification. This does the same thing:
I tried it in different way to get the solution. Now i understand i should not use "sprintf", sorry for the inconvenience caused. I will give more attention for replying a thread in future.