Re: Problem with printing input.
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: 21 Apr 2005 06:53:53 GMT
In article <1114061152.442467.165550@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
<ramakrishnat@xxxxxxxxx> wrote:
>try execute this program ...
>#include <stdio.h>
>/* print the input one word per time on different lines */
>int main(void)
>{
> int c;
> while ((c = getchar()) != EOF) {
> if (c == ' ' || c == '\n' || c == '\t')
> putchar('\n');
> else
> putchar(c);
> }
> return 0;
>}
And if the input is
hey you rama krishna
is your program going to print one word per line?
--
"Never install telephone wiring during a lightning storm." -- Linksys
.
- Follow-Ups:
- Re: Problem with printing input.
- From: ramakrishnat
- Re: Problem with printing input.
- References:
- Problem with printing input.
- From: Matt
- Re: Problem with printing input.
- From: ramakrishnat
- Problem with printing input.
- Prev by Date: Re: What all gcc does
- Next by Date: Re: Simple question about pointer types
- Previous by thread: Re: Problem with printing input.
- Next by thread: Re: Problem with printing input.
- Index(es):
Relevant Pages
|