The following code segment performs a simple encryption routine on string password. How many times does the following loop execute? What is the value of password after the for loop terminates?


string password = "notsecure";

for (int i = 0; i < password.length(); i++)

{

password.at(i) += 1;

}

Respuesta :

tonb

Answer:

9 times

password == "oputfdvsf"

Explanation:

The loop executes as many times as there are characters in the string.