Complete the code to exit the loop when i equals 5.
for(int i = 0; i < 10; i++) { if(i == 5) { [1]; } printf("%d\n", i); }
Complete the code to stop the while loop when count reaches 3.
int count = 0; while(1) { if(count == 3) { [1]; } printf("Count: %d\n", count); count++; }
Fix the error in the code to exit the for loop when num is 7.
for(int num = 0; num < 10; num++) { if(num == 7) { [1]; } printf("%d\n", num); }
Fill both blanks to create a loop that prints numbers until it reaches 4, then stops.
for(int i = 0; i < 10; i++) { if(i [1] 4) { [2]; } printf("%d\n", i); }
Fill all three blanks to create a loop that stops printing when the character 'q' is found in the array.
char letters[] = {'a', 'b', 'c', 'q', 'd'};
for(int [1] = 0; [2] < 5; [3]++) {
if(letters[i] == 'q') {
break;
}
printf("%c\n", letters[i]);
}