Question: What initial value of num would prevent cnt from being incremented three times or more in the following code? int main() { int cnt =
What initial value of num would prevent cnt from being incremented three times or more in the following code?
int main() {
int cnt = 10; int num = 1;
do {
cnt = cnt + 1;
num = num - 1;
} while (num != 0);
cout << cnt;
return 0;
}
Select one:
a. No such value
b. 0
c. 2
d. 4
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
