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
Assoli18 [71]
4 years ago
13

Suppose a variable is passed By Value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub

procedure. What will the value of the variable be after the Sub procedure has executed?
Computers and Technology
1 answer:
algol [13]4 years ago
4 0

Answer:

"The value of the variable will remain the same which is already have when the sub-processor is called".

Explanation:

The above question said that:-

void fun(int a)

{

  a=a+1;

}

void main()

{

  int a=5;

  fun(a);

}

//what will be the value of a in the main function after the fun function is excuted.

  • Then the answer is: the value of a will be 5 in the main function.
  • It is because when the fun function is called, then a variable that is defined in the fun function is a local variable for fun function. That scope after the fun function is null.
  • The a variable inside the fun function is a different variable and the main function a variable is also a different variable.
  • So when the user prints the value of a variable inside the fun function, it will give the result as 6.
  • But when he prints the value of a variable inside the main function, then it will give the value as 5.
You might be interested in
In addition to the cost of legal services and the cost of treatment, which of the following are considered direct costs for work
Mrrafil [7]

Answer:

what are the options for the question

3 0
2 years ago
Consider a class called Rocket that has a private instance variable called Engine. You are writing a "getter" for the Engine. Us
dusya [7]

Answer:

when user wants duplicate copy of the object

Explanation:

Encapsulation are one of the key foundations of object-oriented programming (OOP). It involves the bundling of data or information with the methods and various techniques which operate on that data.

It can be used in hiding the true values or state of a structured data object that is in a class, preventing unauthorized parties' direct access to them.

The circumstances that can be allowed in returning a reference to the existing Engine is when user wants duplicate copy of the object.

4 0
3 years ago
Floating point values (real numbers that can handle up to 5 decimals)
Ann [662]

Answer:

1.45638

Explanation:

p please mark me as brainlest

4 0
3 years ago
Windows OS and Mac OS are examples of which type of operating system?
german
Windows OS and Mac OS are examples of single user, multi tasking Operating Systems.
5 0
4 years ago
Read 2 more answers
Explain how do compare and contrast graphic organizers help you to synthesize information?
Soloha48 [4]

Answer:

Answer: Given two or more sets of features of items, people, events, etc; compare and contrast graphic organizers help you to see what the sets have in common and what difference one set from the others, that is, what characteristics are unique from each set.

8 0
3 years ago
Read 2 more answers
Other questions:
  • What may happen if a large number of computer users are attempting to access a web site at the same time that you are
    9·2 answers
  • Which situation can result in positive population growth?
    14·1 answer
  • Create the Following Menu in a loop so the menu will continually show until the user chooses to exit.AddMultiplyExitAdd a value
    10·1 answer
  • 1. If this traffic signal is turned on after the red light, it means you may cross the intersection, but you _______ wait until
    12·2 answers
  • Creating a chart using a spreadsheet Chart Wizard involves four steps. Which is the last step?
    6·1 answer
  • WHAT IS MULTIMEDIA SUPPOSED TO MEAN ???
    15·2 answers
  • When an object is acted on by unbalanced forces, the object will always
    11·1 answer
  • In the table below, identify the data type that would be most suitable for the second field.
    10·2 answers
  • Anyone wanna join my giggl?
    11·2 answers
  • Arrange the computers in the order fastest to slowest: Minicomputer, Supercomputer, Personal Computer and Mainframe.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!