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

Match the following terms to their meanings: I. criterion II. filter III. normalization IV. comparison operator V. foreign key A. process of grouping data into correct tables B. display of a subset of records C. evaluates the relationship between two

quantities D. number, text phrase, or expression used to select records from a table E. a field in one table that is the primary key in another table What will be an ideal response?

Computer Science & Information Technology

The ________ toolbar is a small toolbar containing frequently used formatting commands that displays as a result of selecting text or objects

Fill in the blank(s) with correct word

Computer Science & Information Technology

Briefly describe the ROM Monitor mode.

What will be an ideal response?

Computer Science & Information Technology

To protect you from accidentally deleting a hard disk file, the OS stores the deleted file in a temporary location. In Windows, this location is the ____.

A. Recycle Bin B. Trash C. Root D. Buffer

Computer Science & Information Technology