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
Mice21 [21]
3 years ago
11

The scope of a variable declared outside of any function is:

Computers and Technology
1 answer:
Marta_Voda [28]3 years ago
5 0

Answer:

a) Global

Explanation:

The scope of a variable declared outside of any function is Global.

Let us consider an example:

int g;

int  add(int a,int b){

   return a+b;

}

int  subtract(int a,int b){

   return a-b;

}

Here the variable g is defined outside any function and is accessible anywhere within the program. This is a global variable.

Variables defined within each function - a,b on the other hand have a local scope are are visible only within their respective function bodies.

You might be interested in
A data flow cannot go directly back to the same process it leaves. There must be at least ________ other process(es) that handle
Flauer [41]

Answer:

Answer is A. One.

Refer below.

Explanation:

A data flow cannot go directly back to the same process it leaves. There must be at least one other process that handle(s) the data flow, produce(s) some other data flow, and return(s) the original data flow to the beginning process.

3 0
3 years ago
LILLE VIC LUNCUL ANCI.
tatiyna

The correct option is C. toward the floor.

The magnetic force on the moving negative charge acts towards the floor.

<u>Explanation</u>:

The direction of the force applied on the moving charged particle placed in the magnetic field can be determined with the help of Fleming’s Left hand rule.

The current flows in the direction opposite to the direction of electron. If the electron moves from negative terminal to positive terminal, then the current will flow from positive terminal to negative terminal.

As given, the direction of electron- South to North

So the direction of current will be- North to South

Using Fleming's Left hand rule we get the direction of force in downward direction, i.e. towards the floor.

5 0
3 years ago
The computers in the administrative offices of the four schools throughout the district are networked to enable employees to acc
muminat
These computers in administrative offices or schools throughout the district that are networked to each other has the type of network most likely used by the workers is LAN network. Usually LAN networks are used in small offices or rooms.
3 0
3 years ago
3. Run the C-LOOK algorithm (requests can only be serviced when the head is moving toward higher numbered tracks); the head is c
o-na [289]

Answer:

See explaination.

Explanation:

An algorithm is specifically defined as the step by step method or process of achieving any type of result.

Please kindly see the attached file for the C algorithm that fulfils the answer of the given problem.

3 0
2 years ago
Write a program whose input is an email address, and whose output is the username on one line and the domain on the second. Exam
kirill115 [55]

Answer:

1 void parseEmailAddress(string email, string& username, string& domain)

2 {

3   int found = email.find("@")

4   if (found > 0)

5   {  

6     username = email.substr(0, found);  

7      domain = email.substr(found+1, -1);

8   }

9   return;

10}

Explanation line by line:

  1. We define our function.
  2. We use an open curly bracket to tell the program that we are starting to write the function down.
  3. We apply the find method to the email variable that was passed by the main program. The find method tells us where is the "@" located within the email.
  4. We use an if statement to ensure that the value that we found is positive (The value is negative if an only if "@" is not in the email address).
  5. We use an open curly bracket to tell the program that we are starting to write inside the if statement.
  6. We apply the substr method to the email to take the username; it receives a start and an end value, this allows us to take from the beginning of the email (position 0) until the "@".  
  7. We apply the substr method to the email to take the domain; it receives the position of the "@" character plus one to take the first letter after the "@" and a minus-one representing the last character on the email.
  8. We use a closing curly bracket to tell the program that the if statement has finished.
  9. We return nothing because we are using reference parameters, which means that the memory positions of username and domain are going to be filled by our parseEmailAddress function and the main function can access those values directly.
  10. We use a closing curly bracket to tell the program that the function has finished.
6 0
2 years ago
Other questions:
  • A job posting is the best way to find out what _____ are required for a position.A.aptitudes B.hard skills C.soft skills D.dress
    10·2 answers
  • Find the gear ratio of the gear in the picture. <br><br> 25 points+brainliest
    13·1 answer
  • What is the best anime that you like the most (give me 3 plz)
    7·2 answers
  • Write a program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s: Diameter (2
    7·1 answer
  • Please list ten things that you have learned an Excel Spreadsheet can do.
    7·1 answer
  • When can we feel electricity?? Tell me the volt
    15·1 answer
  • What adaptation Judy and her parents have that help them run from predators coming?​
    6·1 answer
  • Is a dot matrix printer an impact or non-impact printer
    12·2 answers
  • A man-in-the-middle attack or impersonation are likely to result in problems with
    12·1 answer
  • PLEASE HELPPPPPPP What should you always disconnect before installing hardware inside a computer’s case?
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!