State whether each of the following is true or false. If false, explain why.
1) An auto_ptr can be used in STL containers.
2) Creating a weak_ptr to a resource increases the reference count.
3) A regular expression matches a string to a pattern.
4) The expression \d in a regular expression denotes all letters.
1) False. An auto_ptr can’t be safely copied and therefore can’t be used in STL containers.
2) False. A weak_ptr assumes no ownership of its resource and doesn’t affect the reference count.
3) True.
4) False. The expression \d in a regular expression denotes all decimal digits.
You might also like to view...
What is the output of the following code segment:
int a = 3, b = 4, c = 5; if (a + 1 > c) cout << a << c; else if (b = = c – 1) cout << a << b; else if (a < c) cout << b << c; else cout << b << a; a) 43 b) 45 c) 34 d) 3445
What is algorithm complexity?
a. A way to describe the efficiency of an algorithm, often by equation b. Number of single instructions used in the algorithm description c. Name of an algorithm for sorting numbers d. Algorithm written with pseudocode
The width-to-height proportion of a monitor is known as the ________
Fill in the blank(s) with correct word
________ would be considered a way to get a quick answer to a question
Fill in the blank(s) with correct word