You are on page 1of 1

/*

X = Source String
n = Number of Characters to be deleted
pos= Position to Start Deleting Characters
*/

#include <string.h>

int delchar(char *X,int n,int pos)


{
if((n+pos-1)<=strlen(X))
{
strcpy(&X[pos-1],&X[n+pos-1]);
return 1; /* SUCCESS */
}
else
return 0; /* String Smaller */
}

You might also like