void strip_out(char *str) {
int length_string = strlen(str);
//printf("%d\n", length_string);
char temp[length_string];
int i = 0;
int j = 0;
while ((*(str + i) != '\0')) {
if (isalpha(str[i])) {
//printf("yes\n");
*(temp + j) = *(str + i);
i++;
j++;
}
else {
//printf("No\n");
i++;
}
}
I need my *str
value to be changed to the value of temp
so i can use it in another function.
I cannot change the return type, if i could I could just return temp
but it has to be void
.