what is the differance between pass by reference and pass
by value.

Answers were Sorted based on User's Feedback



what is the differance between pass by reference and pass by value...

Answer / shalini

In the pass by reference we are using the pointer that is
here, we are passing only address where value is stored. but
in the case pass by value we are using ordinary variable
that is pass the value itself. here the value cannot be
changed in calling function and returning back to called
function but this is possible in call by reference

Is This Answer Correct ?    13 Yes 0 No

what is the differance between pass by reference and pass by value...

Answer / vijaya

in pass by value only the actual value of a variable is
copied to a formal parameter & it doesn't effects the
actual value when any operations r done on it
where
in pass by refference we r sending address of variables it
gives exact results but any oprations done on it may effect
actual values

Is This Answer Correct ?    9 Yes 0 No

what is the differance between pass by reference and pass by value...

Answer / srikanth

In pass by value we can pass value through the arguments

In pass reference with the help of operation

Is This Answer Correct ?    3 Yes 1 No

what is the differance between pass by reference and pass by value...

Answer / sowjanya

in pass by value method actual values of a variable are
copied to the formal arguments . modifications of these
values by performing some operations on it are not effect on
the actual value. i.e these modifications are not returned
to calling function.
in pass by reference method addresses of the actual
variables are copied to the formal arguments. modification
of these variable values effects the actual value by
returning these modifications to calling function.

Is This Answer Correct ?    2 Yes 0 No

what is the differance between pass by reference and pass by value...

Answer / achal ubbott

When we use 'pass by value' method, acopy of the object is
sent to the called function. So the copy constructor of the
object gets called. But the called function cannot modify
the content of the original object.
But references of an object are like alias. When 'pass by
reference ' is used it is actually using address at the
underlying. This way the called function may modify the
contents of the original object since operations are being
performed over the same object using its address, not on
the copy.

Is This Answer Correct ?    1 Yes 0 No

what is the differance between pass by reference and pass by value...

Answer / kiran

In Pass-by-value, changes made in the formal parameters will not reflect in actual parameters and vice-versa. Where as In Pass-by-reference, changes made in the formal parameters will reflect in actual parameters and vice-versa.

Is This Answer Correct ?    0 Yes 0 No

what is the differance between pass by reference and pass by value...

Answer / vasanth

pass by value :passing the varibles directly into function
augments

pass by reference:
passing the address of the pointer varible

Is This Answer Correct ?    0 Yes 6 No

Post New Answer

More C Interview Questions

main() { int age; float ht; printf("Enter height and age"); scanf("%d%d",&height,&age); if((age<=20)&&(ht>=5)) {printf("She loves you");} else {printf("She loves you");} }

2 Answers  


What is f'n in math?

0 Answers  


In C program, at end of the program we will give as "return 0" and "return 1", what they indicate? Is it mandatory to specify them?

5 Answers  


What is the general form of function in c?

0 Answers  


what is printf

5 Answers   MVSR, Satyam,






What is function pointer and where we will use it

2 Answers   Infosys, NetApp,


What is dynamic variable in c?

0 Answers  


difference between ordinary variable and pointer in C?

2 Answers  


What is typeof in c?

0 Answers  


how can i get the output 54321 4321 321 21 1 in c programming........???? pls help......

10 Answers   Infosys,


Is the exit() function same as the return statement? Explain.

0 Answers   Agilent, ZS Associates,


Which one to choose from 'initialization lists' or 'assignment', for the use in the constructor?

0 Answers  


Categories