Helping Me Learn C: Resources & Tips

  • Thread starter Thread starter Someone502
  • Start date Start date
  • Tags Tags
    Resources Tips
Click For Summary

Discussion Overview

The discussion revolves around the learning of the C programming language, including its relevance compared to C++ and C#. Participants explore resources, the necessity of learning C before C++, and the implications of choosing one language over another for different programming tasks.

Discussion Character

  • Exploratory
  • Debate/contested
  • Technical explanation

Main Points Raised

  • Some participants inquire about resources for learning C and whether it is necessary to learn C before C++ or if they can start directly with C++.
  • One participant asserts that C is easy to learn due to its limited keywords and concepts, suggesting that reading well-documented programs can be beneficial.
  • Another participant emphasizes the advantages of learning C first to grasp foundational programming tricks before moving to object-oriented design in C++.
  • There are claims that learning C is beneficial for optimization in coding, particularly in game development, where C and C++ conventions often blend.
  • Contrarily, some participants argue that it is not necessary to learn C to optimize code, suggesting that C++ provides sufficient access to C functions and that one can focus on object-oriented programming directly.
  • One participant mentions Objective-C as an alternative, particularly for Mac OS X development, and encourages deciding on a language based on personal goals and project requirements.

Areas of Agreement / Disagreement

Participants express differing opinions on whether learning C is essential before C++ and the best approach to learning programming languages. No consensus is reached on the necessity of learning C for optimization or the best path for a beginner.

Contextual Notes

Some participants reference specific resources and books, while others highlight the importance of understanding the context of programming languages in relation to specific applications, such as game development or system programming.

Someone502
Messages
40
Reaction score
0
First is there a topic with links to learn C.
Second do i even need to learn C or can i just learn C+ or C++.
Third is there a place i can learn C.

Thanks
 
Computer science news on Phys.org
I don't think there is a C+, just a C# and C++. There is not too much support on the NET for C#, atleast if you are into RAD. Why do you want to learn C# or C++ over other languages?
 
1) This most likely has been covered at some point here. I've partaken in a few C discussions so I know they exist.
2) No you can go right to C++ if you like. C++ is backwards compatible in many respects.
3) School/University, KN.King wrote a book called "C A Modern Approach" which is an excellent source, as is http://www.cs.rit.edu/~kar/pointers.on.c/index.html.

C by itself is easy to learn---Kind of like othello. There are only 35 or so key words and a handful of concepts. It's pretty easy actually. But like othello, C takes a lot of time and practice to master. A good resource is to read through short, well documented, programs. Start downloading small open source project files and read through them. There a a lot of small projects out there, and actually seeing what others do is invaluable.

Also, google is also your friend in this regard. If you search for C++ or C programming language you'll most certainly find a plethora of information.

Well, good luck.
 
its better to learn C first to learn all the little short tricks that C has to offer before dwelling into the OO design of C++.
 
neurocomp2003 said:
its better to learn C first to learn all the little short tricks that C has to offer before dwelling into the OO design of C++.

http://www.parashift.com/c++-faq-lite/how-to-learn-cpp.html#faq-28.2

This link will answer your question exactly.
However I highly recommend you read the entire page. It will save you quite a lot of time.
 
Last edited by a moderator:
yeah but to write optimization code its better to learn C rather than depending always on C++ utility.
Besides in game development you see a lot of C/C++ convention blends...people still use malloc/realloc/memset and printf is so much more friendly then count. I love to overload operators, and inheritance is a beautiful thing but i still rely on the basic C functions. A good book will teach both but a lot of books leave out those functions.
 
Last edited:
neurocomp2003 said:
yeah but to write optimization code its better to learn C rather than depending always on C++ utility.
Besides in game development you see a lot of C/C++ convention blends...people still use malloc/realloc/memset and printf is so much more friendly then count. I love to overload operators, and inheritance is a beautiful thing but i still rely on the basic C functions. A good book will teach both but a lot of books leave out those functions.

Oh c'mon this is not true. You DO NOT have to learn C to optimize code. Now, your point about the games is bcause most games are written in C but use a C++ like interface because game environments include a lot of 'objects'---creatures, textures, halls, pools, guns, etc.

Someone502 you need to decide what you want to do with your programming knowledge. Many projects (Windows, Linux/BSD kernels, Gnome...) are written in C. Windows GUI has a C++ layer; however, you can still access windows API's using C if you like (C++ is a little easier though IIRC---it's been years since I've done anything on Windows). There are projects out there that are 100% C++ though such as KDE and OpenOffice; moreover, as mentioned above game engine designers usually code in C but engine interfaces are typically OO because of the nature of modern games. If you want to work for Valve or Blizzard then a real good understanding of C++ is a must.

The thing about C++ is you still have full access to C functions so, if you want to learn C++ then just do that. Learn how to be a good OO programmer. Don't cloud your mind with C idioms or procedural programming styles if OO programming is your goal. You can learn C later if you want.

If you want to learn C then pretend C++ doesn't even exist.

A third choice is objective-C. Mostly a Mac OS X language but you can use it on most pretty much any system. gcc can compile objective-c so if you run Linux/unix you won't be left out of all of the fun Mac programmers have (Macs use gcc so it's no surprise that gcc on other systems can compile OC code).

http://www.toodarkpark.org/computers/objc/

Anyway, the best plan is to decide---using whatever arbitrary pro's and con's you need to use---which language is best for you i.e. do some research and then learn that language. Don't bother putzing around with learning intermediate languages because you usually add concepts and procedurtal idioms that you will not or cannot use in the language you wanted to leard to begin with.

As an aside, once you master one language(this takes a long time) then all other languages can be picked up in a matter of minutes or days instead of the weeks or months it will take you to learn the first.

Good luck.
 
Last edited by a moderator:

Similar threads

  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 16 ·
Replies
16
Views
6K
  • · Replies 10 ·
Replies
10
Views
2K
  • · Replies 6 ·
Replies
6
Views
2K
  • · Replies 40 ·
2
Replies
40
Views
4K
  • · Replies 6 ·
Replies
6
Views
4K
  • · Replies 16 ·
Replies
16
Views
5K
Replies
3
Views
2K
  • · Replies 10 ·
Replies
10
Views
4K
  • · Replies 133 ·
5
Replies
133
Views
14K