Category Archives: C Programming

The extern Keyword

After all the recent posts about statics, I wanted to talk about the extern keyword before moving onto something different. Do you remember the problem we had with our “global” static variable in this post? If you haven’t read it, the code example illustrated that static variables are only available to code in the translation […]

Static Variables In C And C++ – Function Level

We’ve looked at file level static variables, so now let’s see what happens when you put them in a function. If you declare a static variable at function level (i.e. inside an normal function, not a class method), then you are creating a variable that will: a) be instantiated the first time the function is […]

Getting Started With C Programming – Hello World Tutorial

If you’ve always wanted to dabble in C, but never quite gotten around to it, have a read through this and give it a go. It is much easier than you might think (easier now, in fact, than it ever has been), to write your first C program, and there is something so deliciously inviting […]

Static Variables in C and C++ – File Level

When is a global not a global? When it’s a static variable. This post, and the next three, will talk about static variables. Let’s start with static variables declared in a file. Static variables in a file If you declare a static variable at file level (i.e. not inside any other code), then you are […]