CSE2305 - Object-Oriented Software Engineering
Self Assesment Questions
For each question choose the single response which best answers the question, or which completes the statement most accurately.
Question 184: | The string class encapsulates: |
the data and functions of an inbuilt char* string |
only the data of an inbuilt char* string |
only the functions of an inbuilt char* string |
the data and functions of a sequence of char*'s |
None of the above. |
Question 185: | Suppose the string s holds the characters "examination". What will s hold after the following statement: s.replace(2,1,"ter") |
"exaternation" |
"examinater" |
"extermination" |
"teramination" |
"termination" |
Question 186: | If s is a string holding the character "a", what is the effect of the statement: s += 2; |
s holds "a2" |
s holds "a\002" |
s holds "aaa" |
It's a compiler error |
It's a run-time error |
Question 187: | Name of the deque class comes from: |
the acronym "Double Ended QUEue" |
the acronym "Dynamically Extended QUEue" |
the acronym "Discrete Elements, Quantised Under Extension" |
the name of woman who invented it: Marie Alperìn de Qué |
the initials of the French ISO sub-committee ("Domaine Elévè Qui Utilisant les Extensiones") which proposed its inclusion in the Standard Template Library. |
Question 188: | The deque and list classes are both optimized for: |
insertion at the end of the sequence. |
insertion at the start of the sequence. |
insertion in the middle of a sequence. |
insertion at either end of a sequence. |
completely different things. |
Question 189: | The member function push_back() has what effect on a list, vector or deque object? |
It creates a new slot at the end of the container (the slot is uninitialized) |
It pushes a value back onto the start of the container. |
It pushes a value back onto the end of a container. |
It pushes a value back off the end of a container. |
It undoes the last deletion of an element in the container. |
Question 190: | The type name map<int,string> produces a type with essentially the same characteristics and abilities as: |
list<string> |
map<int,char*> |
map<string,int> |
vector<int> |
vector<string> |
Question 191: | The complex class template may only be given certain types as its template parameters: |
int, float, or double |
int, long, or double |
int, float, or char* |
int, double, or long double |
float, double, or long double |
Question 192: | The <complex> header file also declare overloaded an overloaded versions of which of the following functions: |
qsort() |
exp() |
trunc() |
fact() |
All of the above. |
Last updated: October 20, 2005