what is call by value and call by reference
Answers were Sorted based on User's Feedback
call by value:The called function sends its value as
argument to calling function.
Call by reference:The calling function sends address of
variable to the called functin.
| Is This Answer Correct ? | 16 Yes | 3 No |
CALL BY VALUE :
this means whenever ur arguments in the function contains only values without passing any addresses is called as call by value..
CALL BY REFERENCE :
this means that whenever u pass an address as an arragument when u call an function , that is called as reference by call
thank u
| Is This Answer Correct ? | 9 Yes | 1 No |
Answer / bharat
call by value means u call function with argument as value
of variable.
and
call by reference means u call function with argument as
address of variable
| Is This Answer Correct ? | 2 Yes | 0 No |
Answer / rina
function is call the value called the call by values
and the function call the address called the call by
refrence....
| Is This Answer Correct ? | 2 Yes | 2 No |
#define MAX(x,y) (x) >(y)?(x):(y) main() { inti=10,j=5,k=0; k= MAX(i++,++j); printf("%d..%d..%d",i,j,k); }
What are structure members?
In the below code, how do you modify the value 'a' and print in the function. You'll be allowed to add code only inside the called function. main() { int a=5; function(); // no parameters should be passed } function() { /* add code here to modify the value of and print here */ }
What is sizeof int in c?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
wat are the two methods for swapping two numbers without using temp variable??
How to access or modify the const variable in c ?
16 Answers HCL, HP,
what is the output on the screen? int n; n=printf("my name is %d",printf("kiran %d",printf("kumar"))); printf("\n %d \n",n);
what is the use of operator ^ in C ? and how it works?
say the following declaration is correct nr not. int b=a,n=0;
What are global variables and explain how do you declare them?
Can you mix old-style and new-style function syntax?