This comes down to what is known as
scope, and there are varying levels of it.
In your first sample; you are effectively declaring a new variable which is local to that block of code (the for loop). Once that block ends, so does that variable.
for (int x = 1; x < 21; x++)
{
int c += x;
}
In your other sample; you are not defining that variable within the FOR block; but it is declared within the same method as the for loop so it is accessible within the loop
int c = 0;
for (int x = 1; x < 21; x++)
{
c += x;
}
In a nutshell... if it's created within a block, it is not accessible after the block ends