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

1. STL ranges [first, last) are always ‘half-open’ – from the first element to a designation for one past the last element.

2. Given a map m, the expression m["value"] will return NULL if there is no string named "value" stored in the map.


1. True
Explanation: Note the begin() and end(),and the rbegin()and rend() member functions that all the sequence containers have. They provide a ‘half open’ range from the first element in the container to one past the last. The rbegin() and rend() members provide a range from the last to past the front, as a reverse_iterator would traverse.
2. False
This will actually add a new entry to the map associated with the key "value" that has the default entry for the map container type.

Computer Science & Information Technology

You might also like to view...

The order of the precedence (from high to low) of the operators binary +, *, &&, ||, ^ is:

a. &&, ||, ^, *, + b. *, +, &&, ||, ^ c. *, +, ^, &&, || d. *, +, ^, ||, && e. ^, ||, &&, *, +

Computer Science & Information Technology

Which option positions the selected object one object closer to the bottom of the stack?

A) Bring Backward B) Send Backward C) Move Backward D) Shift Backward

Computer Science & Information Technology

Which of the following is a visual representation of information that you want to organize on a slide?

A) Text box B) WordArt C) SmartArt D) A shape

Computer Science & Information Technology

The Last Known Good Configuration option can be used only to correct changes made since the previous logon

Indicate whether the statement is true or false

Computer Science & Information Technology