So I've finished C in school. Finished a Deitel book about C(The C part at least) though unprescribed. I know there's more, but 'how to' books isn't going to cover it. The school library isn't helping.

I want more indepth info/lessons about C and I don't know where to go/begin or is just studying some published API the next step? Or maybe the whole standard library.

I've read somewhere here that the C library isn't really C itself. That bugged me a lot during classes which in turn bugged the teacher which ultimately made me buy said Deitel book.

So yea, throw me a bone.

Don't get me wrong. I'm no expert even at the things I know now. Curiosity just kept bugging me really.

I want more indepth info/lessons about C and I don't know where to go/begin

More study never hurts. Reading code and participating on active C forums (as well as having a complete reference) will go a long way over time. But the best way to improve yourself is and has always been to write code. There are things you learn by doing that can't be learned by study.

I've read somewhere here that the C library isn't really C itself.

The whole of the C library can be written in C, and for the most part it usually is. However, nothing stops implementations from using assembly, for example, to speed things up.

That bugged me a lot during classes which in turn bugged the teacher

That's an odd thing for your teacher to be bugged about. Anyone qualified to teach C (and programming) should be able to give a similar explanation to mine without pause.

But does the whole feature set and everything C has to offer end with what 'how to' books give? I always try to think whether what I know can make something big which tells me if I know enough and atm I'm not very confident without really using other APIs.

What is 'C' then? I tried opening some header files and god knows what those things mean. That was one of the things that really convinced me that there's still more. It bugs me how on earth can they make those APIs using the standard library because I'm confident they can't, at least using what I know, and that there's more to it that isn't really THAT needed by 'end users' so nobody talks about it.

That teacher never really practiced programming. It was a freshman class so I thought it was fine.

But does the whole feature set and everything C has to offer end with what 'how to' books give?

No. "How to" books teach the most useful or widely used subset of features (sometimes not even that much). Those books generally cater to beginners, who would be overwhelmed by everything C has to offer. Further, knowing the features of the language is a long way from knowing how to use them effectively.

What is 'C' then?

C is the language and library definition provided by ISO (a draft of the standard can be found here, but it's not light reading).

I tried opening some header files and god knows what those things mean.

You shouldn't expect to understand those things yet. Real world code will look wildly different from the toy programs you're used to because real world code needs to be robust in the presence of errors, needs to handle hardware and software bugs/incompatibilities, and performance (both memory usage and CPU usage) must be finely tuned.

It bugs me how on earth can they make those APIs using the standard library because I'm confident they can't

You're right, and for the most part they can't. The majority of libraries and APIs cannot be written without platform or hardware dependencies. While getting by with just the standard library is a noble goal, it's often simply not possible. But that doesn't mean you can't call platform dependent libraries, like POSIX or the Win32 API to do the work.

commented: Deserves credit +14

So where do I go now? I want to be able to 'master' C, in A sense rather than THE sense, before moving to another language. Using code effectively will come along with more advanced computing principles and experience.

I'm sorry if I seem arrogant for using 'master'.

I know this is C forum but I would like to bring up a point that programming is not language. Generally programmers can say: "I know this language best but I can learn any language others use, programming is programming." (most people have actually strong preferance, I for example generally prefer Python)

Try to challence your ability to think through problems and solve them. You could do worse than for example digging in the projecteuler.net math/programming challenges.

You could also learn other language like Python, Haskel, Lisp etc to widen your view. But first you must master well formulating programs.

commented: You seem to LOVE Python, always mentioning that fact in the C/C++ forum. Seroisly, is your love of Python helpful to those with C/C++ problems? Think about it. -4
commented: I see no point why WaltP should down rep you. I agree with your point, so i override your negative rep. +9

I'm not sure what the Dietal book presented, so let me recommend the bible of C, "The C Programming Language", second edition, by Kernighan and Ritchie.

This is the "heart" of C, by two of the developers of it. It's excellent, and definitely "meaty", in a good way. Although none-too-fat, it is not for "dabblers". Be sure to work through the exercises at the end of each chapter. This material is available on line, Google it. Also available are the answers to the exercises, iirc.

The next step is Algorithms and Data structures, and practicing solving real life exercise problems, with C. I don't mean full production code, but programs that show you know how to find and use a suitable algorithm and data structures, for the problem.

Work with a simple problem, say you have 10 names, and you need them in two orders for your reports: 1) Sorted alphabetically, and 2) in their original order. Your job is to make this available as quickly as possible, as part of a much larger program. Now:

1) what sorting algorithm would you use?
2) if the names need to be shown first in sorted order, and later in their original order, how would you do that? (yes, it's a trick question, so think tricky).

Now your boss comes in and says instead of 10 names, your functions should handle 10,000 names, optimized still of course. Redo it.

(You can download long lists of names to assist with the data. Again, Google).

Now your boss comes back and says instead of your list just having names, your data will have a simple struct of firstname, lastname, sex, and age. He still wants just one sorting function, but now he wants it to sort using any of the members of the struct, but keep it text only, for now.

Oops! Now your boss is back, and wants the above all to be done in binary, with fixed length fields for each record. (A record is a struct in C, and a field is a struct member in C. I use them interchangeably.)

Your boss likes your functions, but says it needs a search function to find any one student, by name. Oh, and he's decided he wants it all to be text based, again. Thanks! ;)

Oops, he's back. He'd like it now to find every group also: names that are "close" in spelling (he's a lousy speller/keyboarder), every male or female when queried for that field only, and every one matching a certain age, when queried for that field only.

You forgot to lock your door, and your boss is back. Now he'd like your functions to give summaries: how many names end in A, B, C ... Z, how many males and females, and how many are in each age group: < 18, 18 - 21, and > 21.

You can work with a problem like this, for a very long time, and learn/practice, all kinds of stuff.

Similarly, you can look at any of the typical or classical programming problems that are sprinkled all over programming forums, and don't forget the little games: Tic Tac Toe, Hangman, Mastermind, Battleship, Minesweeper, etc. Note that no game is all that easy to program, but solving little puzzles first, is a great way to build up to that level.

When you see a post for help, ask yourself "How would I solve this problem?". The first step in writing good code is choosing appropriate algorithms and data structures, and keeping your priorities right:

accuracy, clarity, efficiency.

I put clarity before efficiency, but they do swap around, from time to time. It may not seem like it now, but being able to maintain and modify code, is more important than whether the run time is 5 seconds longer -- most of the time.

Have fun! ;)

A good 'advanced' C book is, "Expert C Programming: Deep C Secrets." It's basically an addition to K&R's book. The book walks through the oddities of C and helps cement in complex topics.

A good 'advanced' C book is, "Expert C Programming: Deep C Secrets."

That's probably my favorite C book. The content is interesting and the writing style is fun.

I was really just looking for C stuff I don't know about yet beside the rest of the standard library I haven't touched yet. The science of computing is only on queue atm.

Another book didn't really come to mind since I thought it was either about standard C, the standard library, or just another 'how to'. I'll try to work out how to get those books, maybe the 'bible' first. Thanks!

I was really just looking for C stuff I don't know about yet beside the rest of the standard library I haven't touched yet.

That's a hole with no bottom, trust me.

I'm 18 with tons of free time. So reading what THE C book isn't also going to take up all of C's features?

I'm 18 with tons of free time.

I've been working with C almost obsessively for 15 years and haven't hit the bottom yet.

So reading what THE C book isn't also going to take up all of C's features?

Is your goal is to be book smart without any actual programming ability?

commented: There is no bottom, it's a void :) +17

It's just that I don't feel like I can do anything at all non-trivial with what I know unless I use published APIs. I know there's nothing wrong with using APIs and those libraries out there but I'll just go on without really knowing the 'how' in those things.

Knowing that pushing the red button on the remote turns the TV on or off is not as satisfying as knowing that that happens because... Well I don't really know what happens from there aside from that it sends a signal via the LED thing but you get the point.

I find that programming skills will develop along the way. I don't plan on using what I will learn only as theoretical knowledge.

That's probably my favorite C book. The content is interesting and the writing style is fun.

It's probably my favorite C book as well!

As for another book--

If you want useful knowledge without programming-- a fantastic book is Code: The Hidden Language of Computer Hardware and Software. This book is really easy to read and the knowledge you pick up is something that will never leave you. The book is full of 'ooohhh so that's how it works!' moments.

I find that programming skills will develop along the way.

It's really the other way around. Focus on programming skills and language/library knowledge will develop along the way.

commented: Yes +17

C is really a system programming language. So if you want to learn more about C and its usage, learn some UNIX/Linux programming. Linux kernel and GNU interface will help you about this.

A good 'advanced' C book is, "Expert C Programming: Deep C Secrets."

That's probably my favorite C book. The content is interesting and the writing style is fun.

Excerpt from it, commenting on the ANSI C standard terse wording.

True, this whole area in the standard appears to have been rendered into English from Urdu via Danish
by translators who had only a passing familiarity with any of these tongues, but the standards
committee was having such a good time that it seemed a pity to ruin their fun by asking for some
simpler, clearer rules.

It's really the other way around. Focus on programming skills and language/library knowledge will develop along the way.

Hmm... I'll take your word for it then.

Thanks for the replies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.