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

Can we change the value of constant variable in c?

0 Answers  


Can true be a variable name in c?

0 Answers  


Find occurence of a character in a sting.

3 Answers   TCS,


Why we write conio h in c?

0 Answers  


What is function and its example?

0 Answers  






What will be printed as the result of the operation below: #include<..> int x; int modifyvalue() { return(x+=10); } int changevalue(int x) { return(x+=1); } void main() { int x=10; x++; changevalue(x); x++; modifyvalue(); printf("First output:%d\n",x); x++; changevalue(x); printf("Second output:%d\n",x); modifyvalue(); printf("Third output:%d\n",x); }

2 Answers  


Is c high or low level?

0 Answers  


What is the output for the program given below typedef enum grade{GOOD,BAD,WORST,}BAD; main() { BAD g1; g1=1; printf("%d",g1); }

4 Answers   ADITI,


If i have an array 0 to 99 i.e,(Size 100) I place the values 1 to 100 randomly like a[0]=29,a[1]=56 upto array[99].. the values are only between 1 to 100. getting the array values by using scanf.. If i entered one wrong element value line a[56]=108. how can i find it.. and also how to find the missing value in 1 to 100.. and i want to replace the missing values.. any one of them know please post your answer..

0 Answers   IBM, Wipro,


write a programme to convert temperature from farenheit to celcius?

4 Answers   IBM,


Do you know what is a programing language ?

0 Answers  


what is the syallabus of computer science students in group- 1?

0 Answers  


Categories