# Learning to Program C



## LORD_OF_WAR (Dec 14, 2008)

Hello to all

As some of you may have guessed, I am starting to learn how to program C during the school holidays. I have been advised to learn C first, and then C++, so I am looking for a useful web tutorial to aid me in learning this complex langauge. I already know almost everything about HTML and CSS, so I now want something a bit more useful to learn. Any help would be great!!!


----------



## department76 (Dec 14, 2008)

i took two c++ classes simuiltaneously without any knowledge of C and i did fine.  dont bother with C, it's obsolete anyhow according to some,  just elarn c++


----------



## Oliver_FF (Dec 14, 2008)

Don't even bother with any form of C/C++/C#, learn Java. I know all 4 and Java is definitely the most useful and easiest to understand.

Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java 

Java runs on any OS/system

All the libraries are already there and ready for you

Its hard to do stupid stuff in Java

You can write poor code and it will optimise it on your behalf as it runs


----------



## Kreij (Dec 14, 2008)

Check out the stickied thread at the top of this forum.
It has a ton of links to all kinds of stuff for progamming.


----------



## LORD_OF_WAR (Dec 15, 2008)

department76 said:


> i took two c++ classes simuiltaneously without any knowledge of C and i did fine.  dont bother with C, it's obsolete anyhow according to some,  just elarn c++



Ok, being the total n00b that i am, I still know a bit of what is right and wrong. I have been suggested, _by a software programmer_ to learn C first, as it is less object orientated that C++. C is not obsolete, although it will eventually go out, I am still willing to learn it.



Oliver_FF said:


> Don't even bother with any form of C/C++/C#, learn Java. I know all 4 and Java is definitely the most useful and easiest to understand.
> 
> Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java
> 
> ...



Once I'm done learing the different C languages, i do intend to leanr some java/javascript, but ATM, I want to learn C.

Thanx to the most recent post, since it was actually helpful. Any Other help would be great!


----------



## Dark_Webster (Dec 15, 2008)

Well, if you really want to learn C, do it. You will find that it is a very powerful language. Why aren't you willing to learn C# or C++? Is it because it's an object-oriented programmimg language?

I believe that C# would be more easier than C, perhaps due to the simplified code and the use of objects.


----------



## Oliver_FF (Dec 15, 2008)

LORD_OF_WAR said:


> Ok, being the total n00b that i am, I still know a bit of what is right and wrong. I have been suggested, _by a software programmer_ to learn C first, as it is less object orientated that C++. C is not obsolete, although it will eventually go out, I am still willing to learn it.
> 
> 
> 
> ...



For the record I'm a software engineer and am currently in my 3rd year of a 4 year Computer Science degree.

If you want to learn to write hacky, poorly written, bug infested code then start with C. If you want to learn to program properly and correctly start with Java.

The only two reasons to learn C in todays world is to:
1. Work for a large company who have to maintain a shed load of legacy code written years ago
2. Write very very heavily optimised programs where the key ingredient is speed. This takes a LOT of skill.

btw java/javascript? You realise they are two unrelated languages, right? The only real similarity is in the name...


----------



## dazed554 (Dec 15, 2008)

I agree with those who say not to bother with C first as I never did. You do not need to immediately understand classes and such to get started with C++.

Anyway if you do decide that you want to learn C and later C++, these web sites can be very helpful:

http://www.cplusplus.com
http://www.cprogramming.com


----------



## Jaffakeik (Dec 15, 2008)

I learned at High-school C++,Delphi,FOXpro,C# a little.but i forgot by now all.because it was not mine field of love


----------



## W1zzard (Dec 15, 2008)

my suggestion is to learn c first, then expand to c++ or java depending on your project requirements. if you decide to use visual studio (which i strongestly recommend) then you can just create c++ projects and write normal c code


----------



## a_ump (Dec 15, 2008)

hmmm idk about internet tutorials, i looked up a bunch to c++ and they won't get you far, you'd be best to buy a book off ebay or amazon, those tutorials only take you so far and don't fully explain everything that you can do, and what you can do with what they show. I'm just starting C++ and skipping C.


----------



## Deleted member 3 (Dec 15, 2008)

Oliver_FF said:


> Did you know that with a Glassfish application server you can write JSP's, which are basically php only they use Java



And with Visual Web Developer you can write ASP's, which are basically php only they use .NET.
What webservers have JSP modules? I take it Apache does, how about others? IIS is the big downside of ASP.


Unless cross platform development is an issue Visual Studio is a great choice, both easy to use and powerful. And most of all, it's extremely well documented.

http://www.microsoft.com/Express/Download/


----------



## LORD_OF_WAR (Dec 16, 2008)

Dark_Webster said:


> Well, if you really want to learn C, do it. You will find that it is a very powerful language. Why aren't you willing to learn C# or C++? Is it because it's an object-oriented programmimg language?





LORD_OF_WAR said:


> _ I have been advised to learn C first, and then C++, _



Ok, bumping this thread back on track, (instead of advice, which i already have recieved) does anyone know of any good online _C_ tutorials??


----------



## FordGT90Concept (Dec 16, 2008)

a_ump said:


> hmmm idk about internet tutorials, i looked up a bunch to c++ and they won't get you far, you'd be best to buy a book off ebay or amazon, those tutorials only take you so far and don't fully explain everything that you can do, and what you can do with what they show. I'm just starting C++ and skipping C.


I second that motion although I know someone that swears by C.  I'll ask him if he has any advice next time I bump into him.  If memory serves, he learned via a book.  I'll try to get the title for the book for you.

C++ is an extension to C.  C++ has some object oriented programming (OOP) concepts in it which are absent for C.  As far as I know, most C code can be compiled by a C++ compiler.


C#/Java I think are a completely different ball game.  Syntax is similar but I really can't see C/C++ helping much with either.  VB is the best stepping stone into C#.  Java was made in a room saturated with weed fumes. XD


----------



## Dark_Webster (Dec 16, 2008)

Java language isn't so bad, but very similliar to C#.

Now books for learning C... the only one I can remember right now is one from Microsoft about C++.


----------



## CashComp (Dec 19, 2008)

I think he really wants to learn about _C_


----------



## Dark_Webster (Dec 20, 2008)

Yes, I know he wants to learn C, but C++ is similiar in some ways to C, so a book about C or C++ would be good.


----------



## direct4 (Dec 21, 2008)

C is a foundation language, almost all modern programming languages, including Javascript, Java, and especially C++ are based off of the C syntax. If you learn C, it'll make learning the other languages much easier.

Java is not a language for beginners, so you should learn another language first. C++ is merely an extension to C (in fact, C++ used to be called "C with classes"), so, when you're learning C, you're also learning C++. After you have a firm understanding of C, then you can add to your knowledge and learn the features that make C++ what it is.

If you ever intend to program microcontrollers (IC chips that are sort of like a self-contained computer), mess around with the Linux kernel or modify the majority of the software that drives the internet, or make Carbon applications for Mac OS X, then you'll need to know C.

C also is a faster language than C++, and produces smaller code due to the fact it doesn't have all the extra features such as the vtable for objects and exception handling. It's also an easier language to learn and to read.  Also, if you intend to take a compute class at college, they often require you take C first, and then C++ later.

C is very much alive and well. 

As for the comment on Java.... don't bother with Java till you learn C and then C++, then your life will be WAY easier. Java is very slow at starting up and currently isn't suitable for use in programs that require speed-- thanks to the garbage collector that allows programmers to be lazy -- which is why Sun is working on an "unsafe" mode for java that throws out the garbage collector, which is the case if you write applications for the Android/G1 and other mobile phones (better get used to proper memory management under C/C++ first before attempting to code in Java for those devices).

I have a tutorial for the C/C++ language that you can get started with:
http://www.coderguide.com/Guides:C/C_Crash_Course

When the C advanced section is complete (that'll cover advanced things such as rarely used operators, linked lists, vectors, and sparse arrays), I'll start on one for C++. This is also one reason why Linux runs faster than Windows, among many other reasons.

As for only learning C++, the main supporter of that is the guy who created C++. I've read his book, and I, and many other long-time programmers disagree with his position... he also has one hell of an ego.


----------



## LORD_OF_WAR (Dec 22, 2008)

Well, at least someone was helpful . . . . .


----------



## Oliver_FF (Dec 22, 2008)

direct4 said:


> C is a foundation language, almost all modern programming languages, including Javascript, Java, and especially C++ are based off of the C syntax. If you learn C, it'll make learning the other languages much easier.
> 
> Java is not a language for beginners, so you should learn another language first. C++ is merely an extension to C (in fact, C++ used to be called "C with classes"), so, when you're learning C, you're also learning C++. After you have a firm understanding of C, then you can add to your knowledge and learn the features that make C++ what it is.
> 
> ...



I'd quote this apart and correct it but to be honest you've made up your mind so there's no point.


----------

