Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


what is the difference between call by value and call by
reference?

Answers were Sorted based on User's Feedback



what is the difference between call by value and call by reference?..

Answer / m.karthiga

in call by value the changes do not affect the value of a
variable because value is passed.but call by reference
should affect the value of a variable because address is
passed

Is This Answer Correct ?    16 Yes 5 No

what is the difference between call by value and call by reference?..

Answer / vijay r15

call by value means passing the value of variable.
Ex fun(a,b)

Call by ref means passing the address of the variable.
Ex fun(&a,&b)

By
Vijay r15
raj.vijay55@gmail.com

Is This Answer Correct ?    8 Yes 2 No

what is the difference between call by value and call by reference?..

Answer / rama krishna sidhartha

Call by value means passing the values.

Call by reference means passing the address of the variables
given.

Is This Answer Correct ?    7 Yes 2 No

what is the difference between call by value and call by reference?..

Answer / mahesh

call by value
int fun(int a,int b);
int fun(int p,int q)
{
temp=p;
p=q;
q=temp;
}
call by reference
int fun(int &a,int &b);
int fun(int *a,int *b)
{
temp=*a;
*a=*b;
*b=temp;
}
call by value is with values n call by ref with adresses n
pointers...

Is This Answer Correct ?    5 Yes 1 No

what is the difference between call by value and call by reference?..

Answer / raju

Call by Value: C support the call by value, where the caller
pass the value to the function and the updates on the
function will not effect on the caller.

Call by reverence: Here will pass the reference of the
variable to function, the update on the function variables
will effect on the caller.

Is This Answer Correct ?    4 Yes 7 No

Post New Answer

More C Interview Questions

which is the best antivirus and how to update it

7 Answers   Infosys,


When should we use pointers in a c program?

0 Answers  


hat is a pointer?

4 Answers   Assurgent,


write a program for 7*8 = 56 ? without using * multiply operator ? output = 56

6 Answers   Xavient,


Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.

1 Answers  






Program to find the absolute value of given integer using Conditional Operators

6 Answers   N Tech,


i have a written test for microland please give me test pattern

0 Answers   Microland,


Write a program for Overriding.

0 Answers  


How to find a missed value, if you want to store 100 values in a 99 sized array?

0 Answers   Honeywell, Zomato,


code for reverse alternate words from astring

1 Answers   IBM,


write a program in c to print **** * * * * ****

1 Answers   TCS,


Differentiate call by value and call by reference?

0 Answers   Cyient,


Categories