The problem here is that first you are are dealing with a string
such as
char *welcome = {'h','e','l','l','o'};
First of all this line input[count]='#';
will overwrite the number in the string referring to count
for instance if 0, now your string is
{'#','e','l','l','o'};
or 2...