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

What is value parameter and reference parameter while things are passed by Also, do a c code to show it

Computers and Technology
1 answer:
azamat4 years ago
3 0

Answer: While constructing a function the parameters can be passed by value or by reference.

In value parameter we actual make a copy of the values which has been passed to the function from the main method while we reference parameter we copy the address of the values in memory so that while our program references those values it it can refer them from their memory location.

Explanation:

Now we take can example to show parameter passing by value and reference with the help of an C program to add two numbers

int add_val(int x, int y) {

 return x + y;

}

void add_ref(int *x, int y) {

 *x += y;

}

int main () {

 int a, b, c, d;

 a = 2;

 b = 1;

 c = add_val(a,b); //value parameter

 d = add_ref(&a, c); // reference parameter

 return 0;

}

In the above code the value the value of c is 3 and the value of d is 5. In add_p we have passed the address of the a but in add_val we have passed the values of a and b.

You might be interested in
A cybercrime: Select one: a. Is the act of defaulting on a properly signed agreement entered into upon the internet. b. Can be c
aalyn [17]

The answer is B because cyber crime is when a computer is used to commit criminal activities.

3 0
4 years ago
Match the header to the protocol data unit where it is added. segment 1. Port ID packet 2. MAC ID frame 3. IP address​
ikadub [295]

Answer:

1. Port - Segment

2. MAC ID - Frame

3. IP address - Packet

Explanation:

Happy December to all!! :)

3 0
3 years ago
Two technician are discussing automotive wire. Technician A says that 12 AWG wire carries more current than 8 AWG. Technician B
Nesterboy [21]
Neither.     8   gauge   will carry more current    because it is larger..


8 0
3 years ago
Terminal resource security is a software feature that erases the screen and signs a user off automatically after a specified len
zepelin [54]

Answer: True.

Explanation:

Terminal resource security is the type of security that automatically logs out it user due to a period of inactivity. Setting up a password for a terminal resource security requires combining characters, symbols and numbers, it must be noted that how vulnerable the system will be is determined by the strength of it password.

There are certain programs that still grant access to their users during certain time of inactivity, this is mainly to reduce the cases of break-in attempts during time off.

4 0
4 years ago
What does an effective pentration test consist of?
DiKsa [7]

Answer:

\tt{ it \: consists \: of \:  uncovering \: \to } \\  \tt{vulnerabilities, } \\  \tt{threats \: and } \\  \tt{ risks  \: in \: softwares}

4 0
3 years ago
Other questions:
  • You install a SATA hard drive and then turn on the computer for the first time. You access BIOS/UEFI setup and see that the driv
    8·1 answer
  • What type of strategy is being used by a website like www.CNNMoney when it describes itself as ""a one-stop destination covering
    14·2 answers
  • "3. 4. Simple number search We will pass you 2 inputs an list of numbers a number, N, to look for Your job is to loop through th
    5·1 answer
  • You are planning on attending college after graduating from high school. you want to become a middle school math teacher in your
    11·2 answers
  • When is the kids choiceee awads?????????????????????????
    12·2 answers
  • Help me guys..<br>thankyou​
    6·1 answer
  • What would your leadership style be?
    14·1 answer
  • 4. True or False: In order to use wi-fi signal/network, you have to remain seated in one spot.
    6·1 answer
  • What's the differences between jojoy and moddroid???
    10·1 answer
  • Which ipconfig command switch would a technician use to display detailed information (such as dns servers and mac addresses)?
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!