[sclug] Off topic C question

Alex Butcher lug at assursys.co.uk
Fri Sep 22 10:53:18 UTC 2006

On Fri, 22 Sep 2006, Patrick wrote:

> Can anyone see why this character counting program always finds zero 
> characters?  Its based on an example from K&R Chapter 1 which also fails.


>        inFile = fopen("motd.xml", "r");

Oh, and unless you're doing this purely to learn C, what's wrong with:

echo "Typed" `wc -l motd.xml | awk '{print $1}'` "lines" && read



Best Regards,
Alex (when all you have is a bash-shaped hammer, all your problems are
       bash-shaped nails...)
Alex Butcher, Bristol UK.                           PGP/GnuPG ID:0x5010dbff

"[T]he whole point about the reason why I think it is important we go for
identity cards and an identity database today is that identity fraud and
abuse is a major, major problem. Now the civil liberties aspect of it, look
it is a view, I don't personally think it matters very much."
  - Tony Blair, 6 June 2006 <http://www.number-10.gov.uk/output/Page9566.asp>

More information about the Sclug mailing list