Question

Form B 29. Which of the following statements about the continue statement is true a. The continue statement is used to exit a
0 0
Add a comment Improve this question Transcribed image text
Answer #1

29. Which of the following statements about the continue statement is true?

ans) d) A Continue statement proceeds with the next iteration of the immediately enclosing loop.

Because Continue statement is used to skip the current iterations and proceeds to the next iteration.

30 . Inside the for loop's parentheses, the third expression is
ans) c) The update expression

Because, Inside the for loop's parentheses,
The first expression ---- initialization
The second expression ---- Testing the condition
The third expression --- updating the expression

31) Which of the following will count down from 10 to 1 correctly?

ans) e) for (int j = 10; j>=1; j--)

Because option a) --- displays nothing
option b) --- displays nothing
option c) --- count down from 1 to 10
option d) --- count down from 10 to 2
option e) --- count down from 10 to 1

32)

ans) c) 0 1 2 3 4

Add a comment
Know the answer?
Add Answer to:
Form B 29. Which of the following statements about the continue statement is true a. The...
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
  • java QUESTION 4 Which of the following statements about a do...while repetition statement is true? A....

    java QUESTION 4 Which of the following statements about a do...while repetition statement is true? A. The body of a do...while loop is executed only if the terminating condition is true. B. The body of a do...while loop is executed only once. C. The body of a do...while loop is always executed at least once. D. None of the above QUESTION 5 To exit out of a loop completely and change the flow of control to the first line after...

  • program. 13. What's the output of the following program? #include< iostream> #include&math> using namespace std; int...

    program. 13. What's the output of the following program? #include< iostream> #include&math> using namespace std; int p 7; void main) extern double var int p abs(-90); system( "pause"); double var = 55; 14. How many times does "#" print? forlint i 0;j< 10; +ti) if(i-2141 6) continue; cout<< "#"; 15. Write the function declaration/prototype for a, pow function b floor function 16. State True or False a. b. c. d. e. isupper function returns a double value for loop is...

  • Which statement is generally false? a. Statements preceding a for and statements in the body of...

    Which statement is generally false? a. Statements preceding a for and statements in the body of a for should typically be merged into the for header. b. Limit the size of control statement headers to a single line, if possible. c. Initialization of a for loop control variable can occur before the for loop executes and not in the loop itself. d. The increment portion of a for header can be a decrement.

  • 41. Executing the "continue" statement from within a loop     causes control to go     A....

    41. Executing the "continue" statement from within a loop     causes control to go     A. to the next line of code     B. out of the loop     C. to the beginning of the loop          D. to check the loop condition for repeating the loop     E. none of the above      42. The 'default' statement inside a 'switch()' is optional.          T__   F__             43. The following 'switch' implementation is legal:              int i = 2;        ...

  • 256 Chapter 4 Loops and Files Review Questions and Exercises Multiple Choice and True/False 1. What...

    256 Chapter 4 Loops and Files Review Questions and Exercises Multiple Choice and True/False 1. What will the printin statement in the following program segment displays int x = 5; System.out.println(x++): b. 6 c. O d. None of these What will the printin statement in the following program segment display? int x = 5: System.out.println(+*x): a. 3 b. 6 C.O d. None of these 3. In the expression number++, the ++ operator is in what mode? a. prefix b. pretest...

  • Question{04}: Which statement is true about "if" and "switch" statements? A. they can be used to...

    Question{04}: Which statement is true about "if" and "switch" statements? A. they can be used to control the flow of your code B. they can use combinations of logicals in their expression C. in some situations, they can be used interchangeably D. they can be used to selectively run lines of code based on a condition or expression E. all of the above Answer{04}=''; Reason{04}=''; Question{05}: Which statement is true about the "else" and "otherwise" A. an "else" is not...

  • QUESTION 1 Which statement results in the value false? The value of count is 0; limit...

    QUESTION 1 Which statement results in the value false? The value of count is 0; limit is 10. (count != 0)&&(limit < 20) (count == 0)&&(limit < 20) (count != 0)||(limit < 20) (count == 0)&&(limit < 20) 10 points    QUESTION 2 If this code fragment were executed in an otherwise correct and complete program, what would the output be? int a = 3, b = 2, c = 5 if (a > b) a = 4; if (...

  • Which of the following is a true statement about loops in C++? A) there are 4 loop statements

    Which of the following is a true statement about loops inC++? A) there are 4 loop statements B) there are 2 loop statements C) there are 3 loop statements D) there are infinite loop statements 25. Which of the following is a true statement about loops inC++? A) while and do...while are most commonly used for countercontrolled loops B) while and do...while are most commonly used for variablecontrolled loops C) while and do...while are most commonly used for event controlledloops...

  • QUESTION 3 Assume x = 4 and y = 5, which of the following is true?...

    QUESTION 3 Assume x = 4 and y = 5, which of the following is true? x < 5 || y < 5 x > 5 || y > 5 x < 5 && y < 5 x > 5 && y > 5 QUESTION 14 Which of the following statements are the same? (A) x -= x + 4 (B) x = x + 4 - x (C) x = x - (x + 4) (A) and (B) are...

  • 15. Which one of the following two conditional statements is correct in determining if m falls...

    15. Which one of the following two conditional statements is correct in determining if m falls outside a range of values, (m <= 0) or (m > n)? Circle one answer: (a) if(m <0||m >n) (b) if(m <= 0 && m >n) (c) if(0 <= m || m <n) (b) if (0 <= m && m <n) 16. The statement (or command or function) is used inside a loop to send control of the program to the last line of...

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