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
Select the correct answer.
alex41 [277]

Answer: It is clustering.

7 0
3 years ago
Which applications run on IHGs private cloud?
Svetlanka [38]

Answer:

Applications CSS and JvaP

Explanation:

6 0
4 years ago
Which type of malware self-replicates between computers (from one computer to another)?
kramer
A "worm" is a self-replicating malware.
6 0
4 years ago
1)What is the hydropower resources/energy?
s344n2d4d5 [400]

Answer:

.

Explanation:

.

6 0
3 years ago
Write a program that divides mystery_value by mystery_value #and prints the result. If that operation results in an #error, divi
Zolol [24]

Answer:

mystery_value = 5  

try:

   print(mystery_value / mystery_value)

except:

   try:

       print(mystery_value / (mystery_value + 5))

   except:

       print(mystery_value * 5)

5 0
3 years ago
Other questions:
  • Your laptop doesn���t have a serial port. what type of connector will your laptop require?
    5·2 answers
  • Why is it not advisable to mark tlc plates with a pen to indicate?
    12·1 answer
  • Research shows that a passive close to a cover letter leads to more interviews. Please select the best answer from the choices p
    8·2 answers
  • . What is the relationship between frequency, wavelength and speed of a wave?
    15·1 answer
  • 14. Which of the following statements is true? A. The most secure email message authenticity and confidentiality isprovided by s
    11·1 answer
  • You want to write a Python program to compute the average of three integer quiz grades for a single student. Decide what variabl
    8·1 answer
  • Free 35 points!!!
    11·2 answers
  • Can you help me with these AP Computer Science Questions. (THIS IS DUE BY 1:30 PM today) you have to evaluate the Boolean Expres
    10·1 answer
  • When you start a new blank document, you begin typing at the
    6·1 answer
  • True or False: Reader Accounts are able to extract data from shared data objects for use outside of Snowflake.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!