in reply to Assigning printf to a variable

Thanks for the replies, sprintf does the trick. Thank you