Question
whats the answers

For the following code, indicate how many times the loop body will execute for the following input values: 2 1 0? userNum - 3
Given the following code, how many times will the inner loop body execute? int row: int col; for (row = 0; row < 2; row - row
What is output by the following code? int row) int col; for (row - 2; row <3; row row + 1) { for (col = 0; col < 1; col - col
Select the correct statement. O Incremental programming may help reduce the number of errors in a program. Once a program is
0 0
Add a comment Improve this question Transcribed image text
Answer #1

1) inner for loop is for (col=o, colc3; col=colt) l/body 3. i) body executes because oc3. colzo and colsot! =) is) col=1 conditiexit from inner for bop Now, dow=2 to =3 condition ( 34 3) is true so, enter to inner inner for loop. colzo - Condition is bu

4) 1st option is correct.

Because, incremental programming means, if any data in the code changes, we have to change the output only which effect due to the change in data. But, entire code should not be changed.

So, by doing this, only some part of code is effected. So, errors may get reduced. So, experts should use this approach.

In other options, a good programmer must check for errors while developing the code rather than after completing the code. Fixme comment means the code have errors and is incorrect. So, we should not expect any fixme comment.

Hence, 1st option is the correct one.

Upvote if u like it.

Thank you.

Add a comment
Know the answer?
Add Answer to:
whats the answers For the following code, indicate how many times the loop body will execute...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT