Create a loop that cannot terminate


Discuss the below:

Q1. If you have a program with a housekeep() module, a mainloop() module, and a finishup() module, when is the second input record usually read?

Q2. Is it ever correct to create a loop that cannot terminate?

Q3. Is it inefficient to place the calculation within the loop when a calculation can be performed once before entering a loop?

Q4. When you must satisfy two or more criteria to initiate an event in a program, should you make sure that the second decision is made entirely within the first decision?

Q5. In most programming languages, are you allowed to ask two or more questions in a single comparison by using a logical AND operator?

Q6. Do most programming languages allow you to ask two or more questions in a single comparison by using a logical OR operator?

Q7. In an AND situation, do you first ask the question that is more likely to be true?

Q8. Are elements in an array differentiated by numbers called subnumbers?

Q9. Of the following, which does not need to occur in a loop: you must initialize a variable that will control the loop; you must compare the variable to some value that stops the loop; within the loop, you must alter the variable? Or is it none of the above answers?

Solution Preview :

Prepared by a verified Expert
C/C++ Programming: Create a loop that cannot terminate
Reference No:- TGS01931880

Now Priced at $20 (50% Discount)

Recommended (98%)

Rated (4.3/5)