#include<stdio.h>
/* Copy and replace multiple blanks and
tabs by single space
Autor:- Surendra Patil
Date:- july 9th 2013
*/
int main()
{
int c;
printf("\n enter the input
with tabs and spaces \n");
while ((c=getchar()) != EOF) {
if(c ==' ' || c ==
'\t') {
putchar(' ');
/* squeze all the
blanks and tabs */
while ( ((c =
getchar()) != EOF) && (c == ' ' || c == '\t'));
}
putchar(c);
}
return 0;
}
Input:-
surendra patil nidasoshi
Output:-
surendra patil nidasoshi
Comments