while (a) {
while (b) {
if (b == 10) {
break;
}
}
}
In the above code you will break the inner most loop where (ie. immediate loop) where break is used.
You can break both the loops at once using the break with label
label1:
while (a) {
while (b) {
if (b == 10) {
break label1;
}
}
}