I\'m attempting to remove a character from a string in C. The problem I am having with my code is that it removes the first instance of the character from the string but als
char str1[30] = "Hello", *prt1, c = 'l'; char str2[30], *prt2; prt1 = str1; prt2 = str2; while(*prt1 != 0) { if(*prt1 != c) { *prt2 = *prt1; prt2++; } prt1++; } *prt2 = '\0';