This 'question' is not a question, but here you are.
int main (int argc, char **argv)
{
printf ("argc=%d argv=%p\n", argc, argv);
return 0;
}
AnswerYes, it can. For instance, if your function returns double you can assign the function call to a variable of type double.AnswerNo, only the returned value, of course.
pancakes
Call by value essentially passes a copy of an object's value whereas call by reference essentially passes the object itself. Pass by reference is the preferred method whenever possible as call by value will automatically invoke the object's copy constructor, which is often unnecessary, especially if the object is not affected by the function call (pass by constant reference).
Call by value only when a function must modify a value, but you do not want those changes to be reflected in the original value. Passing by value creates a copy of the value which falls from scope when the function returns. Note that in C++, call by value is the default. This is fine for all primitive data types, including pointer variables, but for complex objects you will generally want to pass by reference to avoid as much unnecessary copying as possible. Use the const keyword to enlist the compiler's help to ensure immutable members are not changed during a function call. Non-const references imply the function will alter the immutable members. That's fine when the changes are expected, but it's a good idea to provide a pass by value overload to cater for automatic copying whenever those changes are not wanted. You can also copy the object yourself and pass it by reference, but the copy remains in scope after the function call returns.
You cannot arbitrarily determine what is passed to a function from outside of the function. If the function expects a reference, then the memory address of the variable will be automatically passed to the function. If the function expects a value, then a copy of the variable's value is automatically passed instead. In other words, it is the function signature that determines what is passed, not how you call the function.
AnswerYes, it can. For instance, if your function returns double you can assign the function call to a variable of type double.AnswerNo, only the returned value, of course.
I guess you meant the following:'In C language, when you call a function,the parameters are passed by-value.'
when the function is call by value,u are making any changes in formal parameter does not reflect the actuasl parameter.
By default, a copy of the argument's value is passed into the parameter variable. This is "call by value" semantics, and the called function can do whatever it wants with the parameter, but it cannot alter the original copy. Sometimes, in C and C++, you can pass the address of the value instead. This is "call by address" semantics, but the called function must be designed to handle it - in this case, the called function can alter the original value. (Actually, it is always "call by value" - what we call "call by address" is simply passing the value of the address, a subtle distinction which is important to understanding the language.)
A function can only return one value, but it can modify its parameters if their type is 'in out' or 'out'.
pancakes
Call by value essentially passes a copy of an object's value whereas call by reference essentially passes the object itself. Pass by reference is the preferred method whenever possible as call by value will automatically invoke the object's copy constructor, which is often unnecessary, especially if the object is not affected by the function call (pass by constant reference).
Call by value it's a mechanism to design to pass arguments to functions. When you call by value a variable within the list of argument of function, it means you ask to provide a copy of the variable. And if it happens that you change the variable within your function, it's not gong to change the original variable.
If you mean 'call by value' then, it means a method of passing argument to a function in c++. In this a copy of argument is passed to function and changes are not reflected.
call custmour care and ask him
Call by value only when a function must modify a value, but you do not want those changes to be reflected in the original value. Passing by value creates a copy of the value which falls from scope when the function returns. Note that in C++, call by value is the default. This is fine for all primitive data types, including pointer variables, but for complex objects you will generally want to pass by reference to avoid as much unnecessary copying as possible. Use the const keyword to enlist the compiler's help to ensure immutable members are not changed during a function call. Non-const references imply the function will alter the immutable members. That's fine when the changes are expected, but it's a good idea to provide a pass by value overload to cater for automatic copying whenever those changes are not wanted. You can also copy the object yourself and pass it by reference, but the copy remains in scope after the function call returns.
Any number can be considered a function - a constant function, to be more precise. That is, the value of the function is the same for all values of "x" or whatever you call your independent variable or variables.