MMOCC the isometric world scene, 2006–now
Archive. Archived from the original MMOCC Forum (2006–2010), recovered from the Internet Archive. The forum is read-only history now — the scene talks on Discord. If you posted here and want something removed, get in touch.

[C Programming]The basics of C!

10 posts · vBulletin era
#1
Hello there,

Now before anyone states, yes I know C is outdated, I know C++ is better. However C is a great language to allow beginners into the world of programming!


Anyway, today I will be showing you guys how to output text in C.

First of all you will need a compiler(DevC++ is great, however any other C compiler will work fine).

Now open Notepad(or DevC++) and type out this little ol' script!

Code:
#2
Some criticism:

Although return looks like a function and many people use it as such, it's not. It doesn't require the brackets.
You do need to return something (an int, it says it before the main() function name) from the main function (the exit code of the program, normally 0 on success and >0 on failure), and by using return(0) you are returning 0 (success). If you didn't return anything, the compiler would probably show a warning message.

I don't think C is outdated or that C++ is better, but for a beginner, I would recommend a higher level language.
#3
It is quite a minimal tutorial however I did find it useful, as for high level languages I recommend Python!

PS: Of course C! is greater than C++
#4
Also you said DevC++ was a compiler, no its an IDE
#5
I know it is an IDE , but for the sake of this tutorial I called it a compiler to reduce the confusion of the beginners. Otherwise I would of have to explain and IDE in detail to stop the beginners from giving up from confusion . Thanks for pointing that out.

If you guys want more C tuts/more advanced C tuts. Then please say
#6
This is rather simple. C has it's uses, it's great for writing programs that interact with the hardware, like kernels
#7
Yeah, good way to put it Adam
I might add variables and input to next tutorial

xLite
#8
By calling DevC++ is a compiler you are causing more confusion
#9
Personally I'd recommend something like BASIC to people new to programming to help them get to grasp with the concepts of logical programming. It's like learning to run before you can walk.
#10
I guess the tutorial is okay for someone trying to grasp the syntax..
I wouldn't recommend Dev-C++ though. It's outdated now. Use an alternative, such as code::blocks.
http://codeblocks.org

Recovered from /coding-tutorials/11963-c-programming-basics-c.html · captured 2008.