What is wrong with the following nested for loop?
for (int i = 0; i < 3; i++)
{
for (int i = 0; i <= 5; i++)
{
// body of the loop here
}
}
Both the internal and the external loop define variables with the same name i
- The nested for loop uses "<=" while the external for loop uses "<"
- The code i++ will cause a syntax error
- Nothing is wrong with these nested for loops
There are not hints for this question