Send ur coding........
I will correct the errors....

Tips to solve ur problem is "In the input character array ,count the no.of characters one by one, copy it character by character........"