Richard Heathfield <> wrote:
> raeiko said:
>
> > Hello guys,
> >
> > i urgently need your help
> >
> > I have to write a C program that reads a series of strings and
> > prints only those that end with the letters ?ed.? To enter the
> > string i should use the command line prompt and when i press the
> > return key, the program should print the string if it ends in "ed"
> > and prompt for another string if it doesn't.
> >
> > My problem is that, even after reading from Dietel book and
> > searching in internet, I didn't get how to use the command line
> > prompt...
>
> You seem to be talking about what are usually known as command line
> arguments.
>
> > Could you be so kind to give me some hints to start from?
>
> I think I see what you mean about Deitel and Deitel's explanation.
>
> Okay, here's the basic idea:
>
> We start off by using the other form of main(). You are probably
> accustomed to int main(void), but to gain access to command line
> arguments we need to use this instead:
Perhaps I'm misreading the OP's post still, but it seems like they
want something like getting input from STDIN interactively via a
shell terminal. Despite the OP mentioning not understanding how to
use "the command line prompt", their spec seems doesn't seem to
indicate the need for command line arguments.
This is an excerpt from the OP's spec:
Message-ID: <c45530e9-d711-4101-9458-
>
... when i press the return key, the program should print the
string if it ends in "ed" and prompt for another string if it
^^^^^^^^^^^^^^^^^^^^^^^^^
> doesn't.
Sorry if I'm missing something painfully obvious. :-/
<snip>
--
Curtis
s/sig\.invalid/gmail.com/;