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

What is pass by reference in functions?

0 Answers  


what is ram?

3 Answers   TCS,


When is a null pointer used?

0 Answers  


What is a class c rental property?

0 Answers  


Explain low-order bytes.

0 Answers  






Explain void pointer?

0 Answers  


Why static variable is used in c?

0 Answers  


what do you mean by defining a variable in our c code?

2 Answers  


What are the advantages and disadvantages of pointers?

0 Answers  


write a program to input 10 strings and compare without using strcmp() function. If the character of one string matches with the characters of another string , sort them and make it a single string ??? example:- str1="Aakash" st2="Himanshu" str="Uday" output:- Aakashimanshuday (please post the answer as quickly as possible)

0 Answers   Google,


implement NAND gate logic in C code without using any bitwise operatior.

4 Answers   Alcatel,


Where define directive used?

0 Answers  


Categories