"Functions" Please respond to the following:

label Computer Science
account_circle Unassigned
schedule 1 Day
account_balance_wallet $5

Imagine you are the lead PHP programmer for a small retailer. Describe the difference between passing a parameter to a function by value versus by reference to newly hired developers. Provide an example of each to support your response.

Jan 18th, 2015

passing a parameter by value makes the copy of the original parameter to be sent and stores the value of this copied value into the variable of function being called. When the function where parameter is passed exits its instructions, the copy of the variable is destroyed and no change it done to the original value of the variable. for example: 

Sort( int x); 

here sort is a function called where x is the parameter passed by value, now consider the implementation of sort function: 

Sort( int p )

{

-----------

when sort will complete itself, the copy of x which will be stored in p will be destroyed and original value of x remains as it is. 

Jan 18th, 2015

Did you know? You can earn $20 for every friend you invite to Studypool!
Click here to
Refer a Friend
...
Jan 18th, 2015
...
Jan 18th, 2015
Oct 23rd, 2017
check_circle
Mark as Final Answer
check_circle
Unmark as Final Answer
check_circle
Final Answer

Secure Information

Content will be erased after question is completed.

check_circle
Final Answer