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
45 points!!
pav-90 [236]

Answer:

ENQUIRE database system

Explanation:

5 0
3 years ago
Read 2 more answers
Binary is used to store what on a computer?<br> •Data<br> •Dates<br> •Address
solmaris [256]

Answer:

Data................

5 0
3 years ago
Read 2 more answers
The production team for a fictional drama is shooting a key scene. One of the actors leaves out part of his scripted dialogue th
denis-greek [22]

Answer:

at last sentence was . The editor's work .

8 0
3 years ago
Read 2 more answers
How to get the level 100 tier in fortnite please help <br><br><br><br> pssss. just a troll m8 ;)
inysia [295]

Answer:

Do missions : )

Explanation:

Fortnite is trash !

5 0
4 years ago
Read 2 more answers
Dan wants to check the layout of his web page content. What is the best way in which he can do this?
KatRina [158]
The answer is b I hope it helped
4 0
3 years ago
Read 2 more answers
Other questions:
  • Thumbnails in the picture gallery display the more common color saturation, color tone, and recolor adjustments. true or false.
    12·1 answer
  • PowerPoint’s _____ feature can assist you in finding answers to questions such as “How can I specify which slides to print?” a.
    6·1 answer
  • What is an efficient way to ensure that the code is working as per the acceptance criteria/business requirements? (1 correct ans
    11·2 answers
  • "A queue automaton is like a push-down automaton except that the stack is replaced by a queue. A queue is a tape allowing symbol
    14·1 answer
  • Complete the firstMiddleLast() function to return a new string with the first, middle, and last character from string. If string
    9·1 answer
  • What are the advantages of Database management system (DBMS)??<br>At least mention six of them​
    10·1 answer
  • In a void function, the return statement is not necessarily. True or false? ​
    11·2 answers
  • Electronic type is often considered to be the latest step in the evolution of the written ______________.
    10·1 answer
  • Which formatting option(s) can be set for conditional formatting rules?
    9·1 answer
  • What is the correct sequence in which a computer operates​
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!