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
Printable View
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
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;
}
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:
...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.Code:for(int i = 0; i < 5; i++) {
while(i > 3) {
printf("hi");
}
}
Good luck!
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...