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
What will be the output of the following code? <?php $foo = 'Bob'; $bar = $foo; $bar = "My name is $bar"; print $bar; print $
SCORPION-xisa [38]

Answer: b. My name is BobBob

Explanation:

  • $foo = 'Bob'; // Assigns foo variable the value Bob
  • $bar = $foo; // Assigns the value of foo to bar
  • $bar = "My name is $bar"; //changes the $bar this is the way to  include variables directly in the string.
  • print $bar; // this prints My name is and moves to the variable $bar which prints the value of $bar which is the value of $foo i.e. Bob
  • print $foo; // prints another Bob
7 0
3 years ago
Read 2 more answers
National ISPs usually offer fewer services and have a smaller technical support staff than regional ISPs.
choli [55]

Answer:

um not sure

Explanation:

5 0
3 years ago
Why dose this keep popping up will give brainlest for first person answer
torisob [31]
What happens when you click answer questions? If nothing happens, exit out or restart, it’s a glitch.
6 0
3 years ago
2 Write<br>a program to and area of<br>4<br>walls. A = 2h (l+b)​
Zanzabum

Answer:

ADGH AVFH VVBLA FDHLAVRGLBHSRGLHFSgh HGK g gH G avoshhbv so bhsf vhbfsb gfsb gb gh g hhow gw

Explanation:

eehhfhsghOhrrbfghedhchggfgsbbfbhdhfhehyfnfnhhsh

3 0
2 years ago
Write a Python program that prints your name, CS classes taken (or other relevant experience), and the date on separate lines. U
BigorU [14]

Answer:

The program in Python is as follows:

name = input("Name: ")

course = input("Course: ")

month = input("Month: ")

day = input("Day: ")

year = input("Year: ")

ddate = (month+"/"+day+"/"+year).replace(" ", "")

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

Explanation:

This line prompts user for name

name = input("Name: ")

This line prompts user for course classes taken

course = input("Course: ")

This line prompts user for month

month = input("Month: ")

This line prompts user for day

day = input("Day: ")

This line prompts user for year

year = input("Year: ")

This line calculates the date and remove all blank spaces

ddate = (month+"/"+day+"/"+year).replace(" ", "")

The next three lines print the user inputs

print("My name is ",name)

print("I have taken  ",course)

print("Today's date is ",ddate)

7 0
2 years ago
Other questions:
  • In older systems, often the user interface mainly consisted of ____-control screens that allowed a user to send commands to the
    11·1 answer
  • Why is it important to verify a customer complaint?
    6·1 answer
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    5·1 answer
  • One of the advantages of off-the-shelf software is that ________________. a. the software contains important features, thus elim
    13·1 answer
  • Complete the sentence.<br> A ___ number is composed of only zeros and ones.
    8·1 answer
  • If you give an actual answer I'll give brainliest​
    13·2 answers
  • What dose a company’s code of ethics cover
    9·2 answers
  • Consider the following code.
    7·2 answers
  • Write a function magicCheck that takes a one-dimensional array of size 16, a two-dimensional array of four rows and four columns
    10·1 answer
  • The ratio of sparrows to bluejays at the bird sanctuary was 5 to 3 If there were 15 bluejays in the sanctuary, how many sparrows
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!