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
Dmitry [639]
3 years ago
5

Why do local variables lose their values between calls to the function in which they are

Computers and Technology
1 answer:
kirill [66]3 years ago
6 0

Answer:

Variables which are declared within a function are called Local variables.They are named local because they are used locally only means they cannot be used outside the function in which they are declared.These local variables exist in the memory till the function execution starts and are deleted when the execution of function ends.Hence they lose their value between calls to the function in which they are declared.

You might be interested in
Which of the following is NOT true about variables?
VikaD [51]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The value stored by a variable can be changed after it is assigned(true).

The value of a variable can be changed after it is assigned, for example:

int a=10;

and we can change the value of variable a in letter program such as:

a=15;

Variables are a name for a spot in the computer's memory (true).

it is true, because the variables value stored in the computer's memory and we can access theses values by their name (variable name). so Variables are a name for a spot in the computer's memory.

Variable names can be words: such as temperature or height (true).

Yes, the variable name can be words such as height, width, temperature etc.

The value stored by a variable cannot be changed after it is assigned (false).

It is noted that the value stored by a variable can be changed after it is assigned. However, it is noted that is some programming language, you can't change the value of static variable.

3 0
4 years ago
Differentiate between computer organization and computer architecture with example
vazorg [7]
<span><span>Computer architecture was essentially a contract with software stating unambiguously what the hardware does. The architecture was essentially a set of statements of the form "If you execute <span>this </span>instruction (or get an interrupt, etc.), then that is what happens." <More sophisticated readers: I get to the term "ISA" later.>
</span><span>Computer organization, then, was a usually high-level description of the logic, memory, etc., used to implement that contract: These registers, those data paths, this connection to memory, etc.

</span></span>Computer Architecture and Computer Organization Examples

<span>Intel and AMD make X86 CPUs where X86 refers to the computer architecture used. X86 is an example on a CISC architecture (CISC stands for Complex Instruction Set Computer). CISC instructions are complex and may take multiple CPU cycles to execute. As you can see, one architecture (X86) but two different computer organizations (Intel and AMD flavors).
<span>
nVidia and Qualcomm on the other hand make GPUs (graphics processing unit as opposed to a CPU central processing unit). These GPUs are based on the ARM (Advanced RISC Machines) architecture. ARM is an example on a RISC architecture (RISC stands for Reduced Instruction Set Computer). Instructions in an ARM architecture are relatively simple and typically execute in one clock cycle. Similarly, ARM here is the computer architecture while both nVidia and Qualcomm develop their own flavor of computer organization (i.e architecture implementation)</span></span>
8 0
4 years ago
True or false
ICE Princess25 [194]
1. True
2. Usually true, but it depends on the search engine you're using.  For example, Google lets you search for several words without commas.
3 0
3 years ago
What materials could I use to make diy headphones and game controller (doesn't have to work) it needs to be handmade so no store
Veseljchak [2.6K]
The materials you could use to make DIY headphones are the following:
Headband - A headphone has a headband used to put over your head. You can use a normal headband for this.
Small Tin Cans - This can be used for the housing of the speaker.
Foam - The speaker has earpads. You can use foam for this.
Wire with jack - You can use a wire with a jack from an old broken earphone or headphone.
Speakers - This one is hardest and the most important part of the headphone. You can look up how to make one using magnets and copper wire or you can just recycle an old pair of working speakers that fit in tin can housing.
4 0
3 years ago
When you save a file, to where does your computer store it?
pentagon [3]
<span>Hello ;) 

A, because the computer will srore the informations on disk or portable disk


</span>
3 0
4 years ago
Other questions:
  • An Information Technology worker who follows the Programming and Software development pathway most likely enjoys
    15·2 answers
  • What is a good monitor for console gaming? (Any price)
    13·2 answers
  • What version of android did nexus one run?
    14·1 answer
  • I need help <br> Match each words with its definition!!!<br> Please helpppppppp
    12·1 answer
  • What do you call when a hacker users multiple guest computers to crack a password?
    11·1 answer
  • A celebrity blogger you have followed for years advises readers to try a new beauty product. Before purchasing the product, a sa
    10·1 answer
  • In this first journal assignment, you will explore the role of testing in the SDLC. You will explain the role and importance of
    9·1 answer
  • Help me! I’ll mark you brainly
    13·1 answer
  • Select the correct answer from each drop down menu
    11·1 answer
  • Trong mạng internet, chúng tôi thay đổi công nghệ mạng LAN sang một công nghệ
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!