Re: need for an extra variable.



Richard Tobin said:

In article <1162288032.438701.110710@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
chandanlinster <chandanlinster@xxxxxxxxx> wrote:

while ((s[0] = c = getch()) == ' ' || c == '\t')

my question is, why would we need the variable 'c'.

What are the types of s[0] and c? What is the type returned by getch()?

Oh, nice spot, sir!

--
Richard Heathfield
"Usenet is a strange place" - dmr 29/7/1999
http://www.cpax.org.uk
email: rjh at above domain (but drop the www, obviously)
.



Relevant Pages