Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Question 1 (1 point) If the capacity of a vector named names is 20 and the size of names is 19, which of the following

Question 1 (1 point)

image text in transcribed

If the capacity of a vector named names is 20 and the size of names is 19, which of the following statements are legal?

Question 1 options:

names.push_back('myName');

names[18]='myNmae';

all of the above

none of the above

Save

Question 2 (1 point)

image text in transcribed

Which of the following would correctly read an entire line from an input file stream named fin into a string variable named line.

Question 2 options:

getline(fin, line);

fin.getline(line);

fin.getline(line,' \');

fin.getline(line,80);

Save

Question 3 (1 point)

image text in transcribed

strcmp(first, second) returns

Question 3 options:

true if first=second, false otherwise

nothing, it's a void function

>0 if first second,

Save

Question 4 (1 point)

image text in transcribed

A character array terminated with the null character is most correctly called

Question 4 options:

a c-string

a character array

a string

none of the above

Save

Question 5 (1 point)

image text in transcribed

If the name of a file to open is in the string variable name fileName, which of the following will correctly open the file for output?

Question 5 options:

out_file.open(fileName);

out_file.open('fileName');

fileName.open(outfile);

out_file.open(fileName.c_str());

Save

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Web Database Development Step By Step

Authors: Jim Buyens

1st Edition

0735609667, 978-0735609662

More Books

Students also viewed these Databases questions

Question

8. Describe the steps in the development planning process.

Answered: 1 week ago