Which of the following is the appropriate for header for varying the control variable over the following sequence of values: 3, 6, 9, 12?
A) for ( int i = 3; i <= 12; i++ )
B) for ( int i = 12; i > 0; i -= 3 )
C) for ( int i = 3; i <= 12; i -= 3 )
D) for ( int i = 3; i <= 12; i += 3 )
E) None of the above.
Correct Answer:
Verified
Q1: The_ part of a for statement header
Q2: A(n)_ modifies the control variable each time
Q3: A(n) _is used to determine whether a
Q4: To avoid logic errors, counter-controlled loops should
Q5: The body of a for statement executes
Q6: Variables of type _store a series of
Q7: The counter variable in a for statement
Q9: When assigning text to a string variable,
Unlock this Answer For Free Now!
View this answer and more for free by performing one of the following actions
Scan the QR code to install the App and get 2 free unlocks
Unlock quizzes for free by uploading documents