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 12:10
Linux is distributed under gnu gpl. why is this important? a. it ensures that only torvalds can profit from the sale of linux b. it prevents unknowledgeable users from downloading programs they don't know how to operate. c. it provides protection for the developers who created linux. d. it states that anyone can copy, modify, and share the program if changes are made public.
Answers: 1
question
Computers and Technology, 22.06.2019 12:30
An atom's diameter is about 0.1 nanometer (1Ă—10-9m), and a human hair is about 1Ă—10-3m. how many times greater is a human hair than an atom's diameter? sorry pushed wronf button but this is math
Answers: 3
question
Computers and Technology, 22.06.2019 18:30
All of the following are characteristics that must be contained in any knowledge representation scheme except
Answers: 3
question
Computers and Technology, 22.06.2019 20:00
Need asap assignment directions: think of an organization (business, religious institution, volunteer organization, sports team) with which you have been involved. imagine outfitting it with an it infrastructure. prepare a plan for what you would do to support outfitting it. draw a map of a network connecting all the individuals, give them pcs and printers, and lay out the design as best you can. the purpose is to begin working with these concepts, not to build a perfect network.
Answers: 2
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
Chemistry, 20.09.2019 16:30
question
Mathematics, 20.09.2019 16:30
Questions on the website: 13722363