1. The inner loop variable is not initialized
for()
{
int a = 0;
}
Each set to 0, to prevent accumulation