Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- /*Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank*/
- main()
- {
- int c,d;
- while ((c=getchar())!=EOF)
- { if (c=' ')
- {
- printf("value of d is %d",((d=getchar())!=EOF));
- if (d=' ')
- {
- putchar(c);
- }
- }
- else
- putchar(c);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement