Q:

Initializing variables in C

I know that sometimes if you don't initialize an int, you will get a random number if you print the integer.
But initializing everything to zero seems kind of silly.
I ask because I'm commenting up my C project and I'm pretty straight on the indenting and it compiles fully (90/90 thank you Stackoverflow) but I want to get 10/10 on the style points. 
So, the question: when is it appropriate to initialize, and when should you just declare a variable:
int a = 0;

vs. 
int a;

A:

There are several circumstances where you should not initialize a variable:

When it has static storage duration (static keyword or global var) and you want the initial value to be zero. Most compilers will actually store zeros in the binary if you explicitly initialize, which is usually just a waste of space (possibly a huge waste for large arrays).
When you will be immediately passing the address of the variable to another function that fills its value. Here, initializing is just a waste of time and may be confusing to readers of the code who wonder why you're storing something in a variable that's about to be overwritten.
When a meaningful value for the variable can't be determined until subsequent code has completed execution. In this case, it's actively harmful to initialize the variable with a dummy value such as zero/NULL, as this prevents the compiler from warning you if you have some code paths where a meaningful value is never assigned. Compilers are good at warning you about accessing uninitialized variables, but can't warn you about "still contains dummy value" variables.

Aside from these issues, I'd say it's generally good practice to initialize your non-static variables when possible.

A:

A rule that hasn't been mentioned yet is this: when the variable is declared inside a function it is not initialised, and when it is declared in static or global scope it's set to 0:
int a; // is set to 0

void foo() {
  int b;  // set to whatever happens to be in memory there
}

However - for readability I would usually initialise everything at declaration time. 
If you're interested in learning this sort of thing in detail, I'd recommend this presentation and this book

A:

I can think of a couple of reason off the top of my head:

When you're going to be initializing it later on in your code.
int x;

if(condition)
{
    func();
    x = 2;
}
else
{
   x = 3;
}
anotherFunc(x); // x will have been set a value no matter what

When you need some memory to store a value set by a function or another piece of code:
int x;  // Would be pointless to give x a value here
scanf("%d", &x);

