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...

Part of the functionality of member function _________ can be performed by member function lower_bound.

a. equal_range b. find c. count d. insert

Computer Science & Information Technology

By searching Technorati, you can find out what bloggers are saying about a particular topic, company, product, or issue.

Answer the following statement true (T) or false (F)

Computer Science & Information Technology