answersLogoWhite

0


Best Answer

The part of a program in which a particular variable may be accessed is called the 'scope' of the variable.

In most cases, the scope of a variable is limited to the function within which it was created, or any function it is passed to as an argument.

You can also use global variables, which can be accessed from any part of the program and have 'global scope'. However, this is generally considered as poor programming practice, and should be used cautiously and sparingly as it tends to make code difficult to read and maintain.

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

13y ago

C. Scope

Page 89

Tony Gaddis

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

It's called 'scope'.

This answer is:
User Avatar

User Avatar

Wiki User

13y ago

Scope.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is A part of a program in witch a variable may be accessed?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

Is the part of the program in which a variable may be accessed?

Your class, enum or getter methods.


What do you mean by variable in c?

scope of a variable is the part of the code within which the variable is defined or the part of your code within which the th variable can be used for example #include<stdio.h> void main() { int variable1 } now this variable (variable1) that we have used can be used anywhere within the main function .but if i write a code as shown below #include<stdio.h> void function1(int a) void main() { int variable1 } void function1(int a) { sum=variable1+variable1; } the compiler wouldn't know what variable1 ,being used in function1 is. we therefore say that variable1 has a scope within the main only if however we would have written int 'variable1' immediately after #include<stdio.h> then 'variable one would have been a global variable and could have been used anywhere within the code


Explain the structure of c program with an suitable example?

Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main() { Declaration part Executable part (statements) } /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) . . . (return type) (function name n) (arguments...) Basic structure of a C program is /* Documentation section */ /* Link section */ /* Definition section */ /* Global declaretion section */ /* Function section */ (return type) (function name) (arguments...) void main() { Declaration part Executable part (statements) } /* Sub-program section */ (return type) (function name 1) (arguments...) (return type) (function name 2) (arguments...) . . . (return type) (function name n) (arguments...)


In Java where do instance variables stored in memory?

An instance variable is part of an object. Therefore, it gets stored together with the object, on the heap. The heap is the part of memory which is used to store objects.An instance variable is part of an object. Therefore, it gets stored together with the object, on the heap. The heap is the part of memory which is used to store objects.An instance variable is part of an object. Therefore, it gets stored together with the object, on the heap. The heap is the part of memory which is used to store objects.An instance variable is part of an object. Therefore, it gets stored together with the object, on the heap. The heap is the part of memory which is used to store objects.


What is a property in OOP?

1.emphasis is on data rather than procedure 2.programs are divided into what are known as objects. 3.data structure are designed such that they charatersize the object. 4.data is hidden and cannot be accessed by external functions. 5.it follows bottom-up approach in program design

Related questions

Is the part of the program in which a variable may be accessed?

Your class, enum or getter methods.


What is the purpose of public in java programming?

Public, Protected, and Private specify what has access to a routine or variable. Public is the most generous, meaning that variable or routine can be accessed from both inside and outside that program. Protected means that the variable or routine can be accessed broadly within the program, but not from outside. private means that variable or routine is only accessible to routine it is part of.


What is the scope of a data statement?

The scope of a data statement refers to where in the program the data is accessible. It defines the visibility and accessibility of the data within a program, determining which parts of the program can access and manipulate the data. Properly scoping data helps in managing data effectively and preventing unintended side effects.


Is it possible to have a variable which has a scope not resticted to a particular part of the Program?

No, as the very meaning of scope is "a part of the program"


What is 'variable' in C programming?

It's a part of the program's data, which has a name,type and value.


When passing an argument by reference the module can modify the argument in the calling part of the program?

Yes, when passing an argument by reference, changes to the argument made within the module will directly affect the original variable in the calling part of the program. This is because the reference to the original variable's memory address is passed to the module, allowing it to modify the variable directly.


Is the part of the experiment that is being tested and changed the variable?

Yes, the part of the experiment that is changing is the variable, or the dependent variable. The independent variable, or the control, is the part that stays the same.


What is the number part of a term with a variable part called?

It is the coefficient of the variable.


Part of speech for witch?

The word "witch" can function as a noun.


A term that has no variable part?

A term that has no variable part is usually called a constant.


What are c storage classes?

storage classes determines the part of memory where storage is allocated for an object. a scope specifies the part of the program which a variable name is visible, that is accessibility of the variable by its name. in c language there are four storage classes automatic, external, register, static.


What is the variable that is the part of the experiment that is affected by independent variable?

dependent variable