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
stiv31 [10]
1 year ago
9

what happens to a local variable when a function call completes (and control returns to the calling statement)

Computers and Technology
1 answer:
Liono4ka [1.6K]1 year ago
7 0

When a function call completes (and control returns to the calling statement) the local variable is undefined.

After the function call is finished, the local variable can be utilized outside of the function at any time. Until the function is called again, a local variable holds onto its value.

While local variables are those that are defined inside a function and have a scope that is specific to that function only, global variables are those that are defined outside of function having global scope.

Local variables are exclusive to a given function and are produced within that function. It cannot be accessed elsewhere other than the function.

Since there are no local variables, the value from the global variables will be used; however, you must ensure that the names of the local and global variables match.

If a variable is modified or created inside of a function but isn't declared a global variable, it is considered local variable.

To learn more about local variable click here:

brainly.com/question/27840441

#SPJ4

You might be interested in
Write a program that reads a list of words. Then, the program outputs those words and their frequencies. The input begins with a
tekilochka [14]

Answer:

The following are the program to the given question:

import java.util.*;//import package for user input

public class Make  //define class Make

{

public static void main(String[] ask)  //define a main method

{

  Scanner obx = new Scanner(System.in);   //declare the Scanner class object

  int size=obx.nextInt(); //get the size of the array from the user

  int a[]=new int[size]; //declare an integer array with given size

  String word[]=new String[size]; //declare a string array with given size

  for(int i=0;i<size;i++) //set the for loop  

  word[i]=obx.next(); //get string input from the user

  for(int i=0;i<size;i++)   //iterates with the array, increase the count

  {

    for(int j=0;j<size;j++)   //defining a loop to check value

    {

      if(word[i].equals(word[j]))  //use if to check that elements of words          

      a[i]++;//increamenting array size

    }

  }

 System.out.print("\n");  //use print for break line  

  for(int i=0;i<size;i++)//set for loop to print the following result

    System.out.println(word[i]+" "+a[i]);//print value

 }

}

Output:

Please find the attachment file.

Explanation:

  • First, establish the predefined package required and instead define the main class and define the main method within the class and method.
  • Declare the scanner class object and receive an object size in the 'size' variable thru the array.
  • Next create two arrays, the integer type "a" with both the input size given and the string type "word" with the input size supplied.
  • Define the loop for which string array elements are acquired and set two to again for loop, which increases with loop iteration the integer data type array by one.
  • Lastly, set the loop for which this result is printed.

5 0
2 years ago
Which unit of computer is used to processed data?​<br>Please help!!!!!!
RoseWind [281]

Hello There!

AnimeVines is here!

Is it Central Processing Unit?

HopeThisHelps!!

AnimeVines

7 0
2 years ago
Read 2 more answers
Brianna is a multimedia specialist who works for a large fast food chain. What task
Tju [1.3M]

Answer:

Recording and publishing training videos for new employees

Explanation:

Multimedia specialists design and create IT-based multimedia products such as websites, DVDs, and computer games that combine text with sounds, pictures, graphics, video-clips, virtual reality and digital animation

4 0
2 years ago
2.17.5 coders answers
BlackZzzverrR [31]

Answer:

start();

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

move();

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

move();

}

}

if(colorIs(Color.blue)){

paint(Color.red);

if(frontIsClear());

}else{

if(colorIs(Color.red)){

paint(Color.blue);

if(frontIsClear());

}

}

function start(){

}

Q. 5.1.3: Move to Wall

Ans:

function start(){

while(frontIsClear()){

move();

}

}

I apologize if its incorrect

5 0
2 years ago
If you aren’t familiar with the idea of a leap year, read “Why Is There a Leap Day?” before continuing with the lab.
Zinaida [17]

The correct debugged code is attached below

<h3>What is a leap year </h3>

A leap year is a year with 366 days and this year occurs once every 4 years. The debugged code line of code of the program written, is as attached below. because the line of code in the question lacks some functions and symbols

Hence we can conclude that the correct debugged code is attached below.

Learn more about Python coding : brainly.com/question/16397886

#SPJ1

6 0
1 year ago
Other questions:
  • In doing a load of clothes, a clothes drier uses 18 A of current at 240 V for 59 min. A personal computer, in contrast, uses 3.0
    7·1 answer
  • To calculate the multiple of 5
    9·1 answer
  • A company is utilizing servers, data storage, data backup, and software development platforms over an Internet connection.
    14·1 answer
  • What options of the hierarchical star topology within the ANSI/TIA-568-C allow the ability to move the workgroup switches closer
    7·1 answer
  • An expression which combines variables numbers and at least one operation
    8·1 answer
  • Which operating system is a version of Linux?​
    13·1 answer
  • write the program or pseudocode algorithm that computes the product and average of three integers and display the results​
    7·1 answer
  • What are the four stages a customer goes through when buying a product?
    7·2 answers
  • In a three-tier architecture, the component that runs the program code and enforces the business processes is the:_______.
    11·1 answer
  • QUESTION 4
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!