Already have an account? Get multiple benefits of using own account!
Login in your account..!
Remember me
Don't have an account? Create your account in less than a minutes,
Forgot password? how can I recover my password now!
Enter right registered email to receive password!
Explain different parameter passing mechanisms to a function with the help of example?
The different parameter-passing mechanisms are given below:
1. Call by value
2. Call by value-result
3. Call by reference
4. Call by name
In first call by value mechanism, the values of real parameters are passed to the called function. These values are allocated to the consequent formal parameters. If a function changes the value of a formal parameter, the modification is not reflected upon the consequent actual parameter. It is commonly utilized for built-in functions of the language. Its major advantage is its simplicity. The compiler can use formal parameter like a local variable. It simplifies compilation considerably.
Call by value-result: This mechanism extends the abilities of the call by value mechanism through copying the values of formal parameters back in consequent actual parameters at return. Such mechanism inherits the simplicity of the first mechanism i.e. but incurs higher overheads.
Call by reference: Now the address of an actual parameter is passed to the called function. If the parameter is an expression, its value is calculated and stored in a temporary location and the address of the temporary location is passed to the called function. If the parameter is an array component, its address is likewise calculated at the time of call. Such mechanism is very popular since this has 'cleaner' semantics than call by value-result.
Call by name: Such parameter transmission mechanism has similar effect as if every occurrence of a formal parameter in the body of the called function is replaced through the name of the consequent actual parameter. The actual parameter consequent to a formal parameter can change dynamically throughout the execution of a function. It makes the call through name mechanism immensely powerful. Though, the high overheads make this less attractive in practice.
Explian Service Topologies Service Topologies In a service-based architecture there increase dependencies between services resulting from cooperation
Engineering and Scientific Software Engineering and Scientific software has been characterized with "number crunching" algorithms. Application starts from astronomy t
Discuss in detail Table management Techniques? An Assembler uses the subsequent tables: OPTAB: Operation Code Table consists of mnemonic operation code and machine langua
What is an I/O buffer? What is the advantage of buffering? Is buffering always effective? Justify your answer with help of an example. One type of I/O requirement arises from
Q. What is Base Register Addressing ? An addressing technique in which content of an instruction specifies base register is added to address field or displacement field of the
As demonstrated in a simple manner in my Animated Tiles example, the purpose of this assignment is to use jQuery animations to develop a simple puzzle using DIV tags and styles. C
Determine in detail about MP3 (MPEG-3) MPEG-3 uses an audio compression technology; it compresses CD-quality sound by a factor of about 10 while retaining most of the quality f
The next type of input is a Pull Down List. With this type you have to employ in place of and it also has a closing tag. This control is used when we have a
Q. Changing the System Prompt? When you change the directory, you would like to keep track of it. The best way to do this is by displaying the name of the current directory alo
Q. Illustrate what is a astrophysics? Answer:- Examine of galaxies, stars and the creation of the universe including predictions about how it will proceed from here.
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!
whatsapp: +1-415-670-9521
Phone: +1-415-670-9521
Email: [email protected]
All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd