C
chitu
Hi pals,
Hope u all of r intersted in C programming.Let start
from d basics.
Hope u all of r intersted in C programming.Let start
from d basics.
Basic English is a good start.chitu said:Hi pals,
Hope u all of r intersted in C programming.Let start
from d basics.
chitu said:Hi pals,
Hope u all of r intersted in C programming.Let start
from d basics.
chitu said:Hope u all of r intersted in C programming.Let start
from d basics.
Yes, we're all interested in C programming. We started from the
basics when this newsgroup was created several decades ago.
If you have any specific questions, feel free to ask them. Before you
do that, please read these links:
<http://www.c-faq.com/>
<http://clc-wiki.net/wiki/Introduction_to_comp.lang.c>
chitu said:Hi pals,
Hope u all of r intersted in C programming.Let start
from d basics.
Keith said:And please don't use abbreviations like "u", "r", and "d" for "you",
"are", and "the".
01 said:i have found the following url of great help :
www.cprogramming.com
i have found the following url of great help :
www.cprogramming.com
Richard Heathfield said:As someone else has already pointed out, the very first example program is
broken (the include directive is split onto two lines). Also, the program
exhibits poor style, as it fails to provide a full prototype in the
function declarator, uses printf where puts would have been better suited
to the task, and has a completely useless getchar call.
"This line is included because many compiler environments will open a new
console window, run the program, and then close the window before you can
see the output." Stupid stupid stupid. Just teach them how to use a console
properly instead, FCOL!
Keith said:Certainly splitting the include directive is an error. (I suspect the
author was having trouble writing the HTML correctly, but of course
that's no excuse.) And I agree that a full prototype should have been
used for main.
As for using printf rather than puts, I don't see the problem.
For a
beginner, remembering a single output function is easier than
remembering a multitude of them; that can come later.
After all, even K&R uses printf() for the classic "hello, world"
program.
As for the "completely useless getchar call" ...[...]
Just teach them how to use a console
properly instead, FCOL!
Why should a C tutorial teach how to use a (presumably Windows)
console properly?
As for using printf rather than puts, I don't see the problem.
After all, even K&R uses printf() for the classic "hello, world"
program.
As for the "completely useless getchar call" ...
[...]"This line is included because many compiler environments will open a new
console window, run the program, and then close the window before you can
see the output." Stupid stupid stupid. Just teach them how to use a
console properly instead, FCOL!
Why should a C tutorial teach how to use a (presumably Windows)
console properly?
I'm not even sure how to do so myself (what little
Windows programming I do is under Cygwin, and I use an xterm window,
not a Windows console).
Richard Heathfield said:Keith Thompson said:
The problem is that it introduces too many concepts in one go. The beginner
has enough weirdities to fathom in a C program without having to worry
about \n. That can come later.
And whilst K&R is an excellent book, I don't think it's perfect by any
means. When I get around to writing a better one, I'll let you know.
As for the "completely useless getchar call" ...
[...]"This line is included because many compiler environments will open a new
console window, run the program, and then close the window before you can
see the output." Stupid stupid stupid. Just teach them how to use a
console properly instead, FCOL!
Why should a C tutorial teach how to use a (presumably Windows)
console properly?
Why should a C tutorial assume you're using a (presumably Windows) GUI? It's
the same only backwards. Do you put a getchar call at the end of your C
programs? I certainly don't. Nor does any serious C programmer I know. Why
teach people a lame way to do things?
From memory, assuming a vanilla XP install:
Start/Programs/Accessories/Command Prompt
or just:
Windows-R to bring up a run dialog, and type: cmd
Then cd to wherever your program is, and type in the program name. Hardly
rocket science.
I know a lot of Windows programmers invoke the compiler from some kind
of GUI. There *should* be a way to run a generated program sensibly
from that GUI, rather than having to fire up a separate command prompt
window and find the right directory manually -- and perhaps there is.
I guess I'm trying to say that I disagree without claiming that I'm
right and you're wrong.
I was thinking there might be a way to
run the program through the Windows GUI without having the window
vanish as soon as the program terminates.
I know a lot of Windows programmers invoke the compiler from some kind
of GUI. There *should* be a way to run a generated program sensibly
from that GUI, rather than having to fire up a separate command prompt
window and find the right directory manually -- and perhaps there is.
Since I'm a command-line guy myself, I'm just displaying my ignorance
in this area.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.