Difference Between Call By Value and Call By Reference?
Answer Posted / shrikant patil
Call by value method:
passing the value of variable to the function.
void main()
{
int x=10,y=20;
printf("%d%d',x,y);
swap(x,y);
}
void swap(int a,int b)
{
int c;
c=a;//changes here do not affect in values
a=b;//of x and y in main function..
b=c;
}
call by reference method:
passing the address of variable to the function.
swap(&a,&b)
&c=&a;
&a=&b;
&b=&c;
changes made in subfunction causes changes in address of
variables n thus in main () also..
| Is This Answer Correct ? | 155 Yes | 33 No |
Post New Answer View All Answers
1/ How do u apprach if error occur in sending idocs ? 2/ where u assigned process code ?
How can we handle table control in bdc? : abap bdc
What work you have done in HR module
Did you create secondary index?
What is your current client number?
please give the remaining answers.
How do you get the number of lines in an internal table? How to use a specific number occurs statement?
Hi every one ! You people are doing a great job here , Im going to attend Tata Technologies interivew on this sunday,Can anyone who has already attended this company interivew or other companies interivews in abap pls share ur experience with me and help me to get into job my id ushareddyabap@gmail.com. Thankyou verymcuh
what comes in Timkein written test I hope some body can tell me at this id plz tell it before 9 pm 19 march
What is the project you are currently working and work that you are doing