722 views

1 Answer

1 1 vote

Call-by-value evaluates the arguments to a function exactly once. Call-by-name evaluates the arguments to a function, zero, once, or more times. Call-by-need evaluates the arguments to a function zero or once, but not more than once.

For Better Understanding

Ref :http://homepages.inf.ed.ac.uk/stg/NOTES/node72.html

Position:
Show:

Related questions

0 0 votes
1 answers 1 answer
1.1k
1.1k views
shree asked Nov 22, 2014
1,090 views
What will be the second value printed by the program if parameter passing mechanism is call by reference?int b=10 //global begin procedure func(int x,int y) begin print(b...
0 0 votes
1 1 answer
3.3k
3.3k views
Shubhanshu asked Nov 4, 2017
3,308 views
void main() { int i = 10, j = 20; evaluate(i+j); } void evaluate(int x) { print(x); x = 2 * 10; // in this I think call-by-name give lvalue error. print(x); }I think call...
0 0 votes
0 0 answers
1.1k
1.1k views
sushmita asked Jan 18, 2017
1,132 views
foo(a, b, c) { b =b++; a = a++; c = a + b*10 } X=1; Y=2; Z=3; foo(X, Y+2, Z);CAN SOMEONE PLEASE TELL THE OUTPUTS FOR CALL BY REFERENCE AND CALL BY NAME. WHAT IS THE DIFER...