i want to replace the tab with \t , space with \s and back slash with
\\, from input to output.
i wrote the program like below. so tell me some one why it is wrong...
Code:main()
{
int c;
while((c = getchar()) != EOF) {
if(c == ' ')
printf("\\s");
else if(c == '\t')
printf("\\t");
else if(c == '\')
printf("\\\\");
else
putchar(c);
}
}