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
I am uploading 100 records out of which say 59th record has error so what will happen if I am using synchronous or asynchronous method of bdc? Can we update the database using local update mode how? : abap bdc
How do you convert non-char field into char type fields ?
What is a multiple line field? : abap bdc
What is the use of start-of-selection.,if not use in report what will happen,?
What is full form of bdc session? : abap bdc
Why do we use dynamic where conditions?
How do you control printer functions from sapscript?
What is meant by a schema? : sap abap hr
I am trying to automate a manual processing of iDOCs in BD87. I used the following code to pass idoc-id to global variable 'DCN' and then skip the first screen of BD87 to go to processing directly. After running this code SET PARAMETER ID 'DCN' FIELD itabhdr-idoc_id. CALL TRANSACTION 'BD87' AND SKIP FIRST SCREEN. it takes me to the first screen because it cannot recognize my idoc-id. How I can pass idoc-id to global? I have used the above code to goto VA02 with VBELN and it worked perfectly.
What are the two levels in defining a match code? : abap data dictionary
Explain what is sequence of event triggered in report?
What is a collect statement?
How will you define posting procedures?
How many types of data classes are there in sap abap? : abap data dictionary
Explain how to write a bdc - how do you go about it?