answersLogoWhite

0

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;

}

User Avatar

Wiki User

14y ago

What else can I help you with?

Continue Learning about Engineering

When function returns a value the entire function call can be assigned a variable?

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.


Is it possible to compare the return value of a function call with another value using a relational operator?

pancakes


Explain the passing parameters as function in Call by Value and Call by Reference and then distinguish between them?

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).


When is it better to call by value vs. call by 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.


When a reference variable is passed to any function than whether it pass address or a copy of a variable?

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.

Related Questions

What is the difference between call by name and call by value in programming languages?

In programming languages, call by value passes the value of a variable to a function, while call by name passes the name of the variable. Call by value evaluates the value before passing it, while call by name evaluates the value when it is used in the function.


What is the difference between call by value and call by name in programming languages?

In call by value, the value of the argument is passed to the function, while in call by name, the expression for the argument is passed and evaluated each time it is used in the function.


When function returns a value the entire function call can be assigned a variable?

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.


Call by function in c language?

I guess you meant the following:'In C language, when you call a function,the parameters are passed by-value.'


What is Call by value?

when the function is call by value,u are making any changes in formal parameter does not reflect the actuasl parameter.


When only a copy of the argument's value is passed into the paremeter variable?

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.)


How many values you can return by call by value and call by reference at a time?

A function can only return one value, but it can modify its parameters if their type is 'in out' or 'out'.


Is it possible to compare the return value of a function call with another value using a relational operator?

pancakes


Explain the passing parameters as function in Call by Value and Call by Reference and then distinguish between them?

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).


What ia call by value?

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.


What is mean by'pass by value'?

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.


How do you Download Videocon WAP settings for Micromax Q5.?

call custmour care and ask him