Re: Problem with printing input.
- From: ramakrishnat@xxxxxxxxx
- Date: 21 Apr 2005 04:31:41 -0700
this reply goes to which thread ?????????
ramakrish...@xxxxxxxxx wrote:
> this program assumes that the words in a line are separated only by
one
> space.
> but writing a program that handles variable number of spaces is a
> breeze once u know the basic logic.
> Walter Roberson wrote:
> > 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
.
- References:
- Problem with printing input.
- From: Matt
- Re: Problem with printing input.
- From: ramakrishnat
- Re: Problem with printing input.
- From: Walter Roberson
- Re: Problem with printing input.
- From: ramakrishnat
- Problem with printing input.
- Prev by Date: Re: Problem with printing input.
- Next by Date: Re: newbie having trouble with conversion program
- Previous by thread: Re: Problem with printing input.
- Next by thread: Re: Problem with printing input.
- Index(es):
Relevant Pages
|