1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
Nata [24]
3 years ago
6

What does the following statement do? vector v(10, 2);

Computers and Technology
1 answer:
Alecsey [184]3 years ago
3 0

Answer:

D) It creates a vector object with a starting size of 10 and all elements are initialized with the value 2.

Explanation:

When you write the statement vector<int> v(10,2); This statement declares a vector or dynamic array of size 10 that is the first parameter and the second parameter is the value with which all the elements in the vector are to be initialized.So in this vector all the 10 values will be initialized with the value 2.It is one of the way of initializing the vector.

You might be interested in
13. By adding built-in writable memory to its cartridge, Nintendo’s _________________ was the first console game that gamers cou
Rzqust [24]

The answer is c
Explanation:
5 0
3 years ago
Before you ever buy your first stock or bond, it's important to understand what type of investor you are. This depends on a numb
Oksi-84 [34.3K]

Answer:

Moderate investor

Explanation:

The moderate investors are most popularly known as 'Balanced investors'. They accepts the risk to principal and they adopt the balanced approach. They mainly uses a mixture of bonds and stocks.

They values the reducing risks and then enhancing the returns equally. They accepts modest risks so as to ensure higher long term returns.

6 0
2 years ago
I need to create a method named "root positive". which will either print the square root of the number passed to it or if the nu
rjkz [21]

Answer:

Explanation:

The following code is written in Java. It is a method that calculates the square root of a number as requested. The method first checks with an IF statement if the parameter value is a positive number and then calculates the square root and prints it to the screen. Otherwise, it prints Number must not be negative. A test case has been provided in the main method and the output can be seen in the attached image below.

import java.util.Scanner;

class Brainly {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.print("Enter a number of type double to calculate square root:");

       double num = in.nextDouble();

       rootPositive(num);

   }

   public static void rootPositive(double num) {

       if (num > 0) {

           System.out.println(Math.sqrt(num));

       } else {

           System.out.println("Number must not be negative.");

       }

   }

}

5 0
3 years ago
a. Fill in the blanks with suitable words: A software that controls and manages all the activities of the computer ... b. A soft
zavuch27 [327]

Explanation:

i don't know

4 0
2 years ago
I’m order to protect your passwords, don’t use easy-to-guess information, don’t share your passwords, and NEVER change your pass
Elena L [17]

Answer:

true!

Explanation:

its better to know your password :))

3 0
3 years ago
Other questions:
  • To make sure that you do not get too tired when typing for long periods, how often should you get up and stretch? Every 15 minut
    9·1 answer
  • Suppose a data broker correctly identifies that your grandmother is addicted to playing online hearts. From its business intelli
    8·1 answer
  • Write the steps for displaying multiple subtotal functions in excel.
    10·1 answer
  • You can use RWA to demonstrate how to do something special on the web, such as displaying articles found on websites that suppor
    15·1 answer
  • Question 2 (2 points)
    6·1 answer
  • how do I delete my brainly account, my child signed up for it and nothing has been paid but I do not want the account to exist a
    7·2 answers
  • If an occupation is projected to decline by 7% over the next 10 years, how would you rate the job outlook? (6 points)
    14·1 answer
  • computer is an electronic machine that is used for data processing to produce meaningful information explain in statement​
    5·1 answer
  • Anyone know why my desktop won’t turn on, I upgraded my ram and my monitor won’t turn on
    5·1 answer
  • Write the icon of full justification​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!