Expert C Programming - Deep C Secrets by Peter van der Linden

By Peter van der Linden

This e-book is for the a professional C programmer, this can be a moment booklet that offers the C programmers complicated counsel and methods. This ebook may also help the C programmer achieve new heights as a certified. equipped to make it effortless for the reader to experiment to sections that are suitable to their speedy wishes.

Show description

Read or Download Expert C Programming - Deep C Secrets PDF

Similar c & c++ windows programming books

The standard C library

Prentice Hall's most vital C programming name in years. A better half quantity to Kernighan & Ritchie's interval. a suite of reusable services (code for development facts buildings, code for acting math services and clinical calculations, and so on. ) on the way to shop C programmers time and cash particularly whilst engaged on huge programming initiatives.

C++ in a Nutshell

To-the-point, authoritative, no-nonsense ideas have consistently been a hallmark of O'Reilly books. The In a Nutshell books have earned an exceptional attractiveness within the box because the well-thumbed references that sit down beside the a professional developer's keyboard. C++ in a Nutshell lives as much as the In a Nutshell promise.

ASP.NET 2.0 Revealed

* in addition to those that obtain the preview at PDC, it's expected that each one different ASP. internet builders could be hungry for info at the re-creation. * might be one of many first actual books on ASP. web 2. zero, to be had once the know-how itself turns into on hand to a much broader viewers. * Very fast paced, since it assumes earlier wisdom of ASP.

Pro SharePoint 2013 Branding and Responsive Web Development

Seasoned SharePoint 2013 Branding and Responsive internet improvement is the definitive reference at the applied sciences, instruments, and strategies wanted for development responsive web pages and purposes with SharePoint 2013. The ebook specializes in ideas that supply the easiest browser adventure for the myriad of units, browsers, and reveal orientations and resolutions.

Extra resources for Expert C Programming - Deep C Secrets

Example text

Interpreting -1 as an unsigned int yields a big positive number, making the clause false. This bug occurs under ANSI C, and under K&R C if sizeof() had an unsigned return type in a given implementation. It can be fixed by putting an int cast immediately before the TOTAL_ELEMENTS: if (d <= (int) TOTAL_ELEMENTS - 2) Handy Heuristic Advice on Unsigned Types Avoid unnecessary complexity by minimizing your use of unsigned types. , "age" or "national_debt"). Use a signed type like int and you won't have to worry about boundary cases in the detailed rules for promoting mixed types.

Return a pointer to a string literal. Example: 2. char *func() { return "Only works for simple strings"; } This is the simplest solution, but it can't be used if you need to calculate the string contents, as in this case. You can also get into trouble if string literals are stored in read-only memory, and the caller later tries to overwrite it. 3. Use a globally declared array. Example: 4. 5. 6. 7. 8. 9. } char *func() { ... my_global_array[i] = ... return my_global_array; This works for strings that you need to build up, and is still simple and easy to use.

Wrong! Handy Heuristic Lint Early, Lint Often Lint is your software conscience. It tells you when you are doing bad things. Always use lint. Listen to your conscience. Separating lint out from the compiler as an independent program was a big mistake that people are only now coming to terms with. It's true that it made the compiler smaller and more focused, but it was at the grievous cost of allowing bugs and dubious code idioms to lurk unnoticed. Many, perhaps most, programmers do not use lint by default after each and every compilation.

Download PDF sample

Rated 4.20 of 5 – based on 33 votes