Paste
Copy
Cut
Options

This problem has been solved!

You'll get a detailed solution that helps you learn core concepts.

See Answer
  • Question: 1)     Assume that vec1 is an existing integer vector. Each of the following statements attempts to create a new integer vector, vec2. Indicate whether each of these statements is legal or illegal.B) vector vec2(10);  legalC) vector vec2(10, 100);  legalD) vector vec2(vec1);E) vector vec2(vec1.size());

    1)     Assume that vec1 is an existing integer vector. Each of the following statements attempts to create a new integer vector, vec2. Indicate whether each of these statements is legal or illegal.
    B) vector vec2(10);  legal
    C) vector vec2(10, 100);  legal
    D) vector vec2(vec1);
    E) vector vec2(vec1.size());
  • Chegg Logo
    Here’s the best way to solve it.
    Solution

    Let's evaluate each statement to determine if it i...

    View the full answer
    answer image blur