views:

81

answers:

3

I've been programming in .NET C# almost exclusively for the past 7 months or so. Before that, most of my programming had been in C++ (from school). At work, I will likely be needing to do a whole bunch of C in the next few months. Most of my exposure to C comes from micro-controllers and stuff I find on the internet. I understand the syntax and many of the difference between C and C++, but I don't really know what kind of built-in functions exist, what libraries I need to utilize to use said functions, and some memory management issues. Essentially I need to find some sort of quick crash course on C. Suggestions?

+8  A: 

Write code. It's the only thing that works. Just pick any topic, and write some code.

Computer Guru
+4  A: 

Some suggestions and links:

  • Get a good cheat sheet for quickly looking up stuff (this one for example).
  • Write some small applications for your own purposes. (BTW you will get the best ideas while on the toilet ;)
  • Look for courses and lecture notes on the Internet.
  • Read tutorials and blogs.

And the most important one: Sing this song all day.

AndiDog
Had to +1 for the song :D
Ree
A: 

Generally, if I want to get a decent feel for a language as fast as possible, I read a little about it and dive into the one or two aspects that make the language "special" and try to thoroughly understand those. The more mundane things like syntax details, the layout of the standard library, etc. can be learned as you go after you learn the one or two most important things to "thinking in" the language. For example:

  • If I were learning C, I'd write a few toy programs that use malloc and pointers extensively. Trying to do even basic string processing will make you understand this stuff real fast.
  • If I were learning C++ or D, I'd first try to grok RAII, basic templates and STL (in C++) or std.algorithm and std.range (in D).
  • If I were learning Lisp, I'd first try to wrap my head around the ideas of macros, S expressions and higher-order functions.
  • If I were learning Ruby, the first thing I would try to do is play around with blocks and get a feel for how they work.
  • If I were learning Python, I'd try to play around with metaclasses, closures, generators and some of the more creative uses for duck typing.
  • If I were learning C#, I'd probably play around a little with LINQ.
dsimcha