Question
Question 16 (1 point) The following declares a c-string and initializes it to speaker char str[]=speaker; Question 16 options: True False Save Question 17 (1
Question 16 (1 point)
The following declares a c-string and initializes it to "speaker" char str[]="speaker";
Question 16 options:
True | |
False |
Save
Question 17 (1 point)
What is the value of numbers.size() after the following code? vector numbers(100);
Question 17 options:
0 | |
10 | |
100 | |
unknown |
Save
Question 18 (1 point)
In a vector, which of the following statements is true?
Question 18 options:
Indexing vector access is range checked. | |
The range of legal index values for a vector is 0 to the value of v.size()-1 | |
To add a value use the member function v.push_front( ) | |
To increase or decrease a vector's size v.new_size(newSize); |
Save
Question 19 (1 point)
Which is the proper way to determine how many characters are in the string variable named str?
Question 19 options:
str.getLength() | |
str.length() | |
length(str) | |
getLength(str) |
Save
Question 20 (1 point)
Using the resize member function alone, you can increase the capacity of an STL vector.
Question 20 options:
True | |
False |
Save
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started