why a.c gets closed. well comma operator has left to right associativity.
for eg
a=(2,3,4) ;
here is a=4 after the statement is executed so similarly why not here. y c.c
is not closed here?
On 13 June 2010 22:16, souravsain souravs...@gmail.com wrote:
For Problem 3 see section 4.2 Using feof()
@divya
u r correct that in a=(2,3,4) 4 gets in a
but if u remove parenthesis then u get 2 in a
here although parenthesis is there bt that is for function call i.e f(1,2,3)
but effectively its written 1,2,3
so a.c get closed
i hope i m clear...plzzz correct me if i m wrong sumwhere
--
You
Guys
Lets keep discussions in t his group limited to Algos and problems
neutral to any language.
@divya: Request you to post these C++ language specific questions to
those language specific groups. This will not only help this group
remain confined to its core purpose but will help you get
@Divya
For (3) : You are getting last line twice because of wrong usage of
feof(fp). Remember , feof() returns true after EOF file is reached and
not when EOF is read.
feof tells you end of file is reached and it can tell that only after
reading EOF and not while reading it !!
So after last line