|
-
Dec 29th, 2000, 03:06 PM
#1
Thread Starter
Fanatic Member
I would like to start programing in C but I don't know where to start.
any good sites out there?
I am a totaly beginner, so it has to be very basic.
thank you
-
Dec 29th, 2000, 03:16 PM
#2
http://www.cprogramming.com
most peoples first program is "hello world"...
Code:
#include <stdio.h>
int main()
{
printf("This is my first C program!");
return 0;
}
-
Dec 29th, 2000, 06:43 PM
#3
Monday Morning Lunatic
I'm going to dive in here...
Dennis' programming comments are fine, but I would suggest that once you've got the hang of it, look seriously at how you "arrange" your code. For example:
Code:
for(int i=0;i<5;i++)
while(i>3)printf("hi");
...that's pretty unreadable. This is better:
Code:
for(int i = 0; i < 5; i++) {
while(i > 3) {
printf("hi");
}
}
That probably won't make sense, but keep it in mind, and you'll find it a lot easier to work out what's going on.
Good luck!
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
-
Dec 29th, 2000, 06:46 PM
#4
parksie is right,
I didn't indent my code, because it doesn't use any if statements, or loops... but i usually indent if it does...
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|