Problem with o/P

pls try the output using the code given by me and do tell me where am I committing
the mistake since I am not getting the whole string printed

dont provide me the direct soln,
do check the code