use sprintf() instead of putstr()