What is the code for a loop that iterates from the end of a string toward the beginning?

a. string::reverse_iterator i = s.begin()
while ( i != s.end() )
{
cout << *i;
++i;
}
b. string::reverse_iterator i = s.rbegin()
while ( i != s.rend() )
{
cout << *i;
++i;
}
c. string::reverse_iterator i = s.end()
while ( i != s.begin() )
{
cout << *i;
--i;
}
d. string::reverse_iterator i = s.rbegin()
while ( i != s.rend() )
{
cout << *i;
--i;
}

d. string::reverse_iterator i = s.rbegin()
while ( i != s.rend() )
{
cout << *i;
--i;
}

Computer Science & Information Technology

You might also like to view...

To manage the security information from the devices in a large network, you should establish a security incident _________________ team.

Fill in the blank(s) with the appropriate word(s).

Computer Science & Information Technology

In a TCP segment, what field indicates how many bytes the sender can issue to a receiver while acknowledgement for the segment is outstanding??

A. urgent pointer? B. ?sliding window C. ?sequence number D. ?URG flag

Computer Science & Information Technology