what is the difference between call by value and call by
reference?
Answer Posted / 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 |
Post New Answer View All Answers
What is 02d in c?
Is null a keyword in c?
What would be an example of a structure analogous to structure c?
What is the difference between pure virtual function and virtual function?
write a program to reverse a every alternetive words in a string in a place. EX: Input is "this is the line of text" Output should be "shit is eht line fo text" Please any one tell me code for that.
What is the difference between far and near in c?
What does %c do in c?
What is struct node in c?
What is the main difference between calloc () and malloc ()?
Can a variable be both const and volatile?
write a program to generate address labels using structures?
Explain what is the difference between functions getch() and getche()?
can we implement multi-threads in c.
What is the right type to use for boolean values in c?
What are header files in c?