"Keith Thompson" <ks***@mib.orgwrote in message
news:ln************@nuthaus.mib.org...
"Malcolm McLean" <re*******@btinternet.comwrites:
[...]
>One problem is that when we take this example
int x;
int *ptr = &x;
it is quite hard to explain the advantage of the operation.
I'm not convinced that the student has to understand why each concept
is useful at the time that it's presented. The "hello, world" program
isn't particularly useful by itself; I think most students can
understand that it's leading to something else.
He does have to understand why what he is beign taught is useful. To some
extent you must trust the instructor. However it helps.
"Hello World", for instance, produces something on the screen.
In assembly, the equivalent is "return x", because there is no easy way of
calling an IO routine from assembly language. So we could say that the
simplest C program that actually does something is one that just returns a
flag to the environment. However that doesn't have the satisfying feel of
"I've made the computer do something" to it.
--
Free games and programming goodies.
http://www.personal.leeds.ac.uk/~bgy1mm