what is the difference between call by value and call by
reference?
Answers were Sorted based on User's Feedback
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 |
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 |
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 |
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 |
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 |
1.Why do you call C is middle level language? 2.Why do you call C is userfriendly language.
hi to every one .. how to view table pool after creating the pooled table? plz help me.. if any knows abt this ..
Linked list is a Linear or non linear explain if linear how it working as a non linear data structures
Write a program that will read the input of any number of digits n in a row of shafh showing the breakdown of the printing and printing figures by the recursive function.
What is void main ()?
please send me the code for multiplying sparse matrix using c
What is the scope of static variables?
Which of these functions is safer to use : fgets(), gets()? Why?
Do you know what is the purpose of 'extern' keyword in a function declaration?
Write a program which take a integer from user and tell whether the given variable is squar of some number or not. eg: is this number is 1,4,9,16... or not
How are pointers declared in c?
increment operateor (++)and decrament(--) #include<stdio.h> #inclide<conio.h> main() { int x=15; while(x!=0) scanf("%d",&x); {