Hi Friend,
Here is the sample code. You can modify it to read the whole paragraph. It's very simple. Try this and let me know.
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
#include <stdio.h>
#include <string.h>
void RemoveSpace(char *ptr);
main()
{
char array[] = "My name is Mahesh Rathi";
RemoveSpace(array);
printf("String = %s\n",array);
}
void RemoveSpace(char *ptr)
{
char *tempptr = ptr;
while(*ptr)
{
if(*ptr != ' ')
{
*tempptr = *ptr;
tempptr++;
}
ptr++;
}
*tempptr=0;
}
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
regards,
Mahesh