Multiple "For loops" and variables

Hey guys.

Simple question:
If I have 50+ different for-loops in void loop(), do I have to assign a different count variable for each?

I mean, it is better like this:

int a,b,c;

for (a=0; a<15; a++) {
// 
}

for (b=0; b<=10; b++) {
// 
}

for (c=0; c<5; c++) {
// 
}

Or it is completely fine if I use:

int a;

for (a=0; a<15; a++) {
// 
}

for (a=0; a<10; a++) {
// 
}

for (a=0; a<5; a++) {
// 
}

?

Having in mind each for-loop does a job that is not connected to each other.

You probably don't need that many for loops in one function (and I strongly strongly recommend against it), but I'll just answer the question as you've asked it.

If the for loops are one after another like you've shown, you do not need a separate index variable for each of them. Your code will only be in one of those loops at a time, so it's impossible to have any cross-loop interference that you might be worried about.

You need separate variables only if you have for loops inside of another for loop. Then you have two loops operating at the same time, so you need a separate index variable for the inside and outside loop.

In your code, as you've shown it, it makes absolutely NO difference whatsoever whether you use the same variable name, or different names. It will not change functionality or memory usage at all. If any of the loops were nested, it would make a big difference, within the nested loops.

Regards, Ray L.