Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Extreme C
  • Table Of Contents Toc
Extreme C

Extreme C

By : Kamran Amini
4.5 (29)
close
close
Extreme C

Extreme C

4.5 (29)
By: Kamran Amini

Overview of this book

There’s a lot more to C than knowing the language syntax. The industry looks for developers with a rigorous, scientific understanding of the principles and practices. Extreme C will teach you to use C’s advanced low-level power to write effective, efficient systems. This intensive, practical guide will help you become an expert C programmer. Building on your existing C knowledge, you will master preprocessor directives, macros, conditional compilation, pointers, and much more. You will gain new insight into algorithm design, functions, and structures. You will discover how C helps you squeeze maximum performance out of critical, resource-constrained applications. C still plays a critical role in 21st-century programming, remaining the core language for precision engineering, aviations, space research, and more. This book shows how C works with Unix, how to implement OO principles in C, and fully covers multi-processing. In Extreme C, Amini encourages you to think, question, apply, and experiment for yourself. The book is essential for anybody who wants to take their C to the next level.
Table of Contents (27 chapters)
close
close
24
Other Books You May Enjoy
25
Leave a review - let other readers know what you think
26
Index

Summary

In this chapter, we revisited some of the important features of the C programming language. We tried to go further and show the design aspects of these features and the concepts behind them. Of course, the proper use of a feature requires a deeper insight into the different aspects of that feature. As part of this chapter, we discussed the following:

  • We talked about the C preprocessing phase and how various directives can influence the preprocessor to act differently or generate a specific C code for us.
  • Macros and the macro expansion mechanism allow us to generate C code before passing the translation unit to the compilation phase.
  • Conditional directives allow us to alter the preprocessed code based on certain conditions and allow us to have different code for different situations.
  • We also looked at variable pointers, and how they are employed in C.
  • We introduced generic pointers and how we can have a function that accepts any kind of pointer.
  • We discussed some issues such as segmentation faults and dangling pointers to show a few disastrous situations that can arise from misusing pointers.
  • Functions were discussed next, and we reviewed their syntax.
  • We explored functions' design aspects and how they contribute to a nicely shaped procedural C program.
  • We also explained the function call mechanism and how arguments are passed to a function using stack frames.
  • Function pointers were explored in this chapter. The powerful syntax of function pointers allows us to store logics in variable-like entities and use them later. They are, in fact, the fundamental mechanism that every single program uses today to be loaded and operate.
  • Structures together with function pointers gave rise to encapsulation in C. We speak more about this in the third part of the book, Object Orientation.
  • We tried to explain the design aspects of structures and their effect on the way we design programs in C.
  • We also discussed the memory layout of structure variables and how they are placed inside memory to maximize CPU utilization.
  • Nested structures were also discussed. We also took a look inside the complex structure variables and discussed how their memory layout should look.
  • As the final section in this chapter, we talked about structure pointers.

The next chapter will be our first step in building a C project. The C compilation pipeline and linking mechanism will be discussed as part of the next chapter. Reading it thoroughly will be essential to continue with the book and proceed to further chapters.

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Extreme C
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist download Download options font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon