subject

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

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 01:30
Someone wishes to run the software on another computer system that runs an operating system that does not support the software what can he do
Answers: 3
question
Computers and Technology, 23.06.2019 16:30
20 points archie wants to use a reflector as he photographs a newlywed couple. what would he consider in his choice? a. shadow and sunny b. homemade and professional c. lamps and boards d. incident and reflected e. neutral density and enhancement
Answers: 3
question
Computers and Technology, 24.06.2019 01:30
Suppose a cpu with a write-through, write-allocate cache achieves a cpi of 2. what are the read and write bandwidths (measured by bytes per cycle) between ram and the cache? (assume each miss generates a request for one block.)
Answers: 1
question
Computers and Technology, 25.06.2019 06:30
How can u permanently delete a picture from your camera ?
Answers: 1
You know the right answer?
What initial value of num would prevent cnt from being incremented three times or more in the follow...
Questions
question
Mathematics, 29.01.2020 12:06
question
Mathematics, 29.01.2020 12:06
question
Mathematics, 29.01.2020 12:06
question
Mathematics, 29.01.2020 12:06
Questions on the website: 13722367