Explain call by value and call by reference, Computer Engineering

Assignment Help:

Call by value and Call by reference

Call by value means sending the values of the arguments- The value of each of the original arguments in the calling function is copied into corresponding formal arguments of the called function. The modification made to the formal arguments has no effect on the values of actual arguments in the calling function.  This method of passing arguments is called call by value verified by swap (int x, int y) function in the following example. 

Call by reference means sending the addresses of the arguments- the addresses of actual arguments in the calling function are copied into formal arguments of the called function. Using these addresses we are really working on actual argument so changes will be reflected in the calling function.

 


Related Discussions:- Explain call by value and call by reference

What are the issues of software development, What are the issues of softwar...

What are the issues of software development One of main issues in software development today is quality. Software must be properly documented and implemented. The notion of sof

Identify the fastest logic gate, Which of the following is the fastest logi...

Which of the following is the fastest logic ECL, TTL, CMOS or LSI ? Ans. The fastest logic is ECL.

Find simplified function f and implement, Q. Find simplified function F and...

Q. Find simplified function F and implement that function using only NAND gates. 1. F(A,B,C) = (A+B) (A'+B+C') (A'+B'+C') 2. F (A,B,C) = A'B'C'+B'CD'+A'BCD'+AB'C' 3. F(X,Y

Why a function canot have delays, Why a function canot have delays? How...

Why a function canot have delays? However in Open Vera, delays are allowed in function. A function returns a value and hence can be used as a part of any expression. This doesn

Why is cloud computing important, Why is Cloud Computing important? The...

Why is Cloud Computing important? There are many implication of cloud technology, for both developers and end users. For developers, cloud computing gives increased amounts of

Explain extranet, Extranet : Extranet is Extension of an Intranet that ...

Extranet : Extranet is Extension of an Intranet that makes the latter accessible to outside companies or individuals with or without an intranet. It is also described as a coll

Give brief explanation about the keyboards, Give brief explanation about th...

Give brief explanation about the keyboards Keyboards are generally not offered as the number of options is limited and owners of the system do not want customers keying in info

Knowledge representation in artificial intelligence , Knowledge Representat...

Knowledge Representation: To recap, now we have some characterizations of Artificial Intelligence, so  when an Artificial Intelligence problem arises, you will enable  to put i

Why digital computers use complemented subtraction method, The chief reason...

The chief reason why digital computers use complemented subtraction is that it ? Ans. By using complemented subtraction method negative numbers can easily be subtracted.

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd