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
Fed [463]
4 years ago
5

When an argument is passed to a method:A) its value is copied into the method's parameter variableB) its value may be changed wi

thin the called methodC) values may not be passed to methodsD) the method must not assign another value to the parameter that receives the argument
Computers and Technology
1 answer:
Dmitry_Shevchenko [17]4 years ago
8 0

Answer:

The correct answer for the given question is option(A) i.e its value is copied into the method's parameter variable.

Explanation:

Following are the points regarding that.

1.In function calling when we use call by value the actual argument is passed to the formal argument .

2.The actual argument are those which is present in the calling portion of the program.

3.The formal parameter are those which is present in method signature.

4.It means that The value of actual argument is copy into the formal argument i.e method's parameter.

5.Let us consider an example

    Following are the code in C++

#include<iostream>// header file

using namespace std;

void sum(int,int);

int main() // main function

{

int a=90,b=9; // variable declaration

sum(a,b);//here a and b are actual parameter calling function sum

return 0;

}

void sum(int p,int q) // function definition

{

cout<<" the sum  is :"<<p+q; // add

}

In this program the actual parameter is a and b and method parameter is p and q respectively.

The variable  a "actual parameter" is copies the value in  variable p "formal parameter".Similarly the variable  b  "actual parameter"  is copies the value in  variable p "formal parameter".So changes made in formal parameter does not reflected back to actual parameter this is call by value which copies the value of actual parameter to method parameter.

output:99

Therefore The correct option is(A).

You might be interested in
Your friend just gave you his old laptop. Whenever you turn on the laptop, though, a black screen appears and asks you to enter
Anastasy [175]

Answer:
C is the answer!

Explanation:

A hard drive contains your operating system which can include your settings and preferences that you included in your device. But it mostly is a storage device so we know it WOULD NOT BE (B.

WOULD NOT BE D beacause powering it back on wouldnt do anything but bring you back to the start.

WOULD NOT BE A beacuse when taking out the battery then putting it back in would just be like turning it off then back on beacuse that just hold the power to a device.

IT WOULD BE C, C IS THE ANSWER beacuse a CMOS batttery contains the main system settings and  also contains information so i think C would be the best answer for this choice.


Hope this helps!
xx <3

7 0
3 years ago
For what reason can security risks never be fully eliminated?​
raketka [301]

Answer:

A vulnerability level of ZERO can never be obtained since all countermeasures have vulnerabilities themselves. For this reason, vulnerability can never be zero, and thus risk can never be totally eliminated.

Explanation:

also we need to be protected from scams and stuff

7 0
3 years ago
¿Por qué es importante aprender a programar?
White raven [17]

Answer:

Es importante aprender a programar, por que es el mismo de que alguen aregle su carro. En estos tiempos, la technolagia se ha convertido en la nueva normal. Va vinir el tiempo quando nosotros necesitamos que arreglar un linia de codigo en nuestras computadoras, y no esta necesario para pagar alguen que ellos lo agan. Como quando necesitas que poner una llanta nueva a tu carro. Tu lo puedes cambiar solo. Entonses como el ejemplo del carro, tu puedes arreglar el linia de codigo en la computadora sin pagar alguen por acerlo.

7 0
3 years ago
2. A shift register can operate:
Naddik [55]
C. Both serially and Perullo
8 0
3 years ago
How do u set up a Wi-Fi network on Android ​
AlladinOne [14]

Answer:

These are some way I know

5 0
3 years ago
Other questions:
  • When the packet leaves the router, which source and destination ip addresses will be contained in the packet?
    9·1 answer
  • Write a recursive function, replace, that accepts a parameter containing a string value and returns another string value, the sa
    5·1 answer
  • It is safe to stand on the top step of a ladder provided it is braced property
    10·1 answer
  • Why is it important for software developers to study Human-Computer Interaction? to make sure a user interface is easy to use, w
    10·2 answers
  • Under the assumption that there exists an unknown Turing machine encodableinc1bits that decides3-SATis inO(n10) time, give imple
    7·1 answer
  • What is the price of a k1 speed birthday party?
    7·2 answers
  • Can somebody help me with this please
    6·2 answers
  • Magbigay ng ibang produkto na ginagamitan ng kasanayan ng basic sketching shading at outlining ​
    12·1 answer
  • Why is it essential for every person living in the 21st century to have a computer​
    9·1 answer
  • you're troubleshooting an ip addressing issue, and you issue a command to view the system's tcp/ip configuration. the command yo
    10·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!