here is the problem for example
in = "a b
ab c
dd";
out = "a b
b c
dd"
Here is my C code
while(c=getchar()!=EOF){
if(c== ){
while( (c1=getchar()) == ); // ignore all other contiguous blank
putchar(c); // output one blank
putchar(c1); // output the next non-blank character
}
else putchar(c);
}
Can I have an implementation with shrinked size?