Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
28 Cards in this Set
- Front
- Back
Which of the following is true? |
If you define any constructors with arguments, the compiler will not define a default constructor. |
|
Which operation does not take place in the following example?int x = 21; double y = 6; double z = 14; y = x / z; x = 5.5 * y; |
Promotion. |
|
Assuming that text is a variable of type string, what will be the contents of text after the statement cin >> text; is executed if the user types Hello World! then presses Enter? |
"Hello World!" |
|
To execute multiple statements when an if statement's condition is true, enclose those statements in a pair of: |
Braces, { }. |
|
When compiling a class's source code file (which does not contain a main function), the information in the class's header file is used forall of the following, except: |
Determining the correct amount of memory to allocate for each object of the class. |
|
Specifying the order in which statements are to be executed in a computer program is called: |
Transfer of control |
|
Which of the following is true? |
For fundamental-type variables, list-initialization syntax allows narrowing conversions that could result in data loss. |
|
An uninitialized local variable contains: |
No value. |
|
What happens when two blocks, one nested inside of the other, both declare variables with the same identifier? (Assume that the outer block declares its variable before the opening left-brace of the inner block.) |
The "outer" variable is hidden while the "inner" variable is in scope. |
|
Overloaded functions must have |
Different return types. |
|
What does the following statement declare?int *countPtr, count; |
One pointer to an int and one int variable. |
|
Which of the following statements about friend functions and friend classes is false? |
A class can either grant friendship to or take friendship from another class using the friend keyword. |
|
An error occurs if: |
An object data member is not initialized in the member initialization list and does not have a default constructor. |
|
A copy constructor must receive its argument by reference because: |
Otherwise infinite recursion occurs. |
|
Which of the following is false? |
It's not possible to pass a list initializer to a constructor |
|
Which of the following statements about inheriting base class constructors is false? |
If an inherited base-class constructor has default arguments, the line of code in Part (a) causes the compiler to generate a derived-class constructor with the same default arguments. |
|
Which of the following statements is true? |
In C++11, only classes that are not declared as final can be used as base classes. |
|
Abstract classes: |
Are defined, but the programmer never intends to instantiate any objects from them. |
|
Which of the following statements about polymorphism is false? |
Polymorphism enables you to deal in specifics and let the execution-time environment concern itself with the generalities. |
|
Which of the following is not true about setw and width? |
Both of them can perform two tasks, setting the field width and returning the current field width. |
|
Which of the following prints the address of character string string given the following declaration?char * string = "test"; |
cout << static_cast< void * >( string ); |
|
Which of the following statements is false? |
C++11 added type char64_t to handle the new double-width Unicode characters. |
|
Part of the functionality of member function ________ can be performed by member function lower_bound. |
equal_range |
|
Which category of iterators combines the capabilities of input and output iterators into one iterator? |
Forward iterators. |
|
The algorithms in the Standard Library: |
Do not depend on the implementation details of the containers on which they operate. |
|
Which algorithm cannot take a predicate function as an argument? |
find |
|
Which of the following represents the efficiency of the insertion sort? |
O(n2) |
|
Given the strings defined below, which statement will not return 0?string s1 = "Mighty Mouse"; string s2 = "Mickey Mouse"; |
7,5,s2, |