Question: The code below is a for loop that reads through message one character at a time and counts the number of a's in message. int
The code below is a for loop that reads through message one character at a time and counts the number of a's in message. int i, count = 0; string message; cin >> message; for (**Line 1**; ** Line 2**; i++) { } if (**Line 3 **) count++; DO Line 1 Line 2 Line 3 1. i = 1 2. message[i+1] == 'a' 3. message == 'a' 4. i=0 5. message[i] == 'a' 6. i message.length() 7. i message.length() + 1
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
