void replace(char* str, char replaced, char replacing){ char *p = NULL; for(p = str; p != NULL && *p != '\0'; p++) { if (*p==replaced) *p=replacing; } puts(str);}