C - Loop Control Statements
Consider the nested loops below. What will be the output?
for(int i = 1; i <= 3; i++) {
for(int j = 1; j <= 3; j++) {
if(j == 2) {
break;
}
printf("%d%d ", i, j);
}
}Consider the nested loops below. What will be the output?
for(int i = 1; i <= 3; i++) {
for(int j = 1; j <= 3; j++) {
if(j == 2) {
break;
}
printf("%d%d ", i, j);
}
}15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions