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
andrezito [222]
3 years ago
11

What is the scope of each variable?

Computers and Technology
2 answers:
vova2212 [387]3 years ago
8 0

Answer:

The scope of petName is local to the class pet.

The scope of color is accessible by all parts of the program.

Explanation:

The variable petName is local to the class, because the variable was created in a function whose name begins with two underscores.

The variable color, while created in the petCarrier class, is accessible to the entire function. It was not created in a function whose name begins with an underscore.

Correct answer edge 2020

kari74 [83]3 years ago
4 0

Answer:

scope of pet name is limited to pet class and color is accessible to the whole program

Explanation:

You might be interested in
Write a program that reads an unspecified number of integers, determines how many positive and negative values have been read, a
GarryVolchara [31]

Answer:

<em>C++</em>

////////////////////////////////////////////////////////////////////////////////////////////////////////

#include <iostream>

#include <vector>

using namespace std;

int main() {

  vector<int> v;

   int n = 1;

   while (n != 0) {

       cout<<"Enter an integer, the input ends if it is 0: ";

       cin>>n;

       v.push_back(n);

   }

   cout<<endl;

   ///////////////////////////////////////////////////////////

   int sum = 0;

   int num_positives = 0, num_negatives = 0;

   for (int i=0; i<v.size()-1; i++) {

       if (v[i] > 0)

           ++num_positives;

       else

           ++num_negatives;

           

       sum = sum + v[i];

   }

   //////////////////////////////////////////////////////////

   cout<<"The number of positives is "<<num_positives<<endl;

   cout<<"The number of negatives is "<<num_negatives<<endl;

   cout<<"The total is "<<sum<<endl;

   cout<<"The average is "<<(float)sum/(v.size()-1);

   ///////////////////////////////////////////////////////////

   return 0;

}

5 0
3 years ago
The transport layer protocol used by the tcp / ip suite that does not provide guarantees on ordering or confirmation of receipt
VARVARA [1.3K]
UDP = connectionless vs. TCP is connection oriented.
4 0
3 years ago
What is internet?<br>what is online?​
slavikrds [6]

Answer:

internet: The Internet is a vast network that connects computers all over the world. Through the Internet, people can share information and communicate from anywhere with an Internet connection.

online: controlled by or connected to a computer., while connected to a computer or under computer control.

3 0
2 years ago
the control programs managing computer hardware and software use the ______ function to control and prioritize tasks performed b
Ira Lisetskai [31]

application management


7 0
3 years ago
I need some cool things to do with windows command prompt.
STatiana [176]
I programmed in batch before so I know a lot of things!

You can ping a website to test your latency.

ping google.com

I have a ton of tricks in cmd (Command Prompt). Message me if you want.





7 0
3 years ago
Other questions:
  • How useful do you find the creation of folders in your computer?
    8·2 answers
  • Two electronics technicians are looking at the representations of a silver atom and a copper atom in the figure above. Technicia
    10·1 answer
  • Discuss two advantages and two disadvantages of agile methods.
    6·1 answer
  • Lisa has a section of her document that she would like to include in the index. Which option should Lisa choose?
    12·1 answer
  • A group consists of 10 kids and 2 adults. On a hike, they must form a line with an adult at the front and an adult at the back.
    10·1 answer
  • Multiple Choice
    8·1 answer
  • Xxx<br>uuuuuu<br>uuuu<br>jjnmn<br>jjh
    12·1 answer
  • In one to two sentences, describe how you would add a new slide to your presentation.
    11·2 answers
  • What starts with p and ends with orn
    15·2 answers
  • A file has TWo parts name them
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!