C is for Cookie, and also C.Read More
In a previous post, Andrei discussed the switch statement. In this post, he gives a more indepth review of switch and then deeply dives into the default case.
Rather than just leaving it out, default can be used to detect the impossible. Read on to handle whoopses, neutrino hits, and beer. And remember, be assertive, but be kind to your future self.Read More
C uses the static keyword for two completely separate purposes simultaneously. In this week's post, Andrei will continue his discussion of variable visibility (scope), look at function scope, and how to limit scope to a single file, using the static keyword.
It's not as shocking as you might imagine, unless you let go.Read More
A lot of people have problems understanding the concept of scope in C programs. Scope defines the visibility of the identifiers in your program.
This week Andrei tackles local and global variables in part 1 of this post on Scope.Read More
Look, if I give you a bunch of stuff that all have to be true, and the first one is false, I'm not going to waste my time checking them all. It's just the way I roll.
This week Andrei looks at shortcutting in conditionals.Read More
This weekend, Andrei went to a huge kite festival in Swift Current, Saskatchewan, and really didn't have a lot of time to come up with a huge post.
Instead, this week, he writes about how the C language handles allocating space for enums.Read More
Wait, what? Andrei finally wrote the long awaited bit-manipulation post? Yes, it's true.
Click through to learn about &, |, ~, and even ^. When would you use these things? And find out what is due for homework this week.Read More
Andrei drew the short straw. His punishment was to write a blog post on boolean logic and bit manipulations. That way Elecia and Chris Svec could refer to the post rather than having to explain it themselves.
This first part is a useful review of boolean logic. If you find it useful, please buy Chris Gammell a beer.Read More
In the final serving of the Embedded Wednesdays crash course in C, Andrei gives a bowlful of function goodness. Parameters, return values, headers, and prototypes. Sprinkle some prototypes, add #includes on top, then add some Good Habits for keeping you regular. But you can't have all of this wholesome goodness without talking about the inevitable void.
In French, the Rice Krispie guys Snap, Crackle, and Pop are known as Crik, Crak, and Crok. All of those names start with C. Coincidence, I don't think so. Pull up a chair and grab a heaping helping of C functions. (Corny? No, I Oat to know how that is Spelt)Read More
Booleans, how difficult can that be, right? TRUE or FALSE, 1 or 0.
This week on the Embedded Wednesdays post, we look at the bool data type that was introduced in C99. Experienced C programmers should read this too, right? TRUE.Read More