Defining is the part where you give a value to a variable. It shouls be done in the proper scope. If you value depends on the iteration, then, obviously, it has to be done inside the loop. If it doesn't, there is no reason to reassign the value at every turn. See :
for (A a : B) {
c = "constant"
}
doesn't make sense.
However, declaration can be discussed. It can be placed outside as it allocates the pointer memory only once, but it can be placed inside if it has a limited scope and don't need to exist outside the loop.