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

Explain asynchronous decade counter, Draw the circuit diagram of Asynchrono...

Draw the circuit diagram of Asynchronous decade counter and explain its working. Ans: To  design  a  circuit diagram of decade  asynchronous  counter  initially  we  dr

Explain about semiconductor memories, Q. Explain about Semiconductor Memori...

Q. Explain about Semiconductor Memories? Originally IC technology was used for constructing processor however soon it was realized that same technology can be used for construc

What are the advantages offered by data mining, What are the advantages off...

What are the advantages offered by data mining? Advantages offered through Data Mining are given below: a) Facilitates discovery of knowledge through massive, large data set

Define mapping and list mapping procedure, Define Mapping and List  mappin...

Define Mapping and List  mapping procedure? The transformation of data from main memory to cache memory is known as an Mapping. Associative mapping Direct mapping

What is called checking CRC in cyclic redundancy, In cyclic redundancy chec...

In cyclic redundancy checking CRC is the? Checking CRC, in cyclic redundancy is the remainder. Normal 0 false false false EN-IN X-NONE X-NONE

Define in detail about the architecture, Define in detail about the Archite...

Define in detail about the Architecture Architecture is the set of resources visible to machine language programmer: Registers, the memory, data representations, instructions

Design a 1-bit full adder, Design a 1-bit full adder: Verify your desig...

Design a 1-bit full adder: Verify your design Use the 1-bit full adder to build a 4-bit adder with Ci=0 Verify: 1 + 4, and 9 + 9 Sram design: Cell: p - 0.5/0.045;

Explain the commonly used code optimization techniques, Explain briefly any...

Explain briefly any three of the commonly used code optimization techniques. 1. Common sub expression elimination: In given expression as "(a+b)-(a+b)/4", in such "common

Units of artificial neural networks, Units of artificial neural networks: ...

Units of artificial neural networks: However the input units simply output the value that was input to them from the example to be propagated. So every other unit in a network

Subtract the numbers using 2's complements, Subtract -27 from 68 using 2's ...

Subtract -27 from 68 using 2's complements. Ans. By using 2's complement 68-(-27)= 68-(-27) 2's complement representation of 68 = 01000100(64+4) 2's complement representatio

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