char stripper(char x[]){
char stripped[20];
int c=0;
for(int i=0; i<strlen(x);i++){
if(x[i]==' '){
continue;
}
else{
stripped[c]=x[i];
c++;
}
}
return stripped;
}
this is the function i've created to return a string/sentence without whitespaces. using this function as a void function and simply printing the stripped
string works, but this iteration of the code returns (null)
. i am somewhat of a newbie to C so simple solutions to solve this problem would be appreciated. Thanks!