View difference between Paste ID: Q8efvsb0 and V8vGiTvj
SHOW: | | - or go back to the newest paste.
1
#include <stdio.h>
2
3
/*Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank*/
4
5
main()
6
{
7
    int c,d;
8
    while ((c=getchar())!=EOF)
9
    {   
10
		if (c=' ')
11
        {
12
			printf("value of d is %d",((d=getchar())!=EOF));
13
            if (d=' ')
14
            {
15
            	putchar(c);
16
            }
17
        }
18
       	else
19
        	putchar(c);
20
    }
21
}