answersLogoWhite

0


Best Answer

It is called callback function. For an example see the qsort function.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: When a function is used as an argument in another function?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Continue Learning about Engineering

What is meant by arguments in c?

Arguments appear in functions and in function calls. Arguments passed to a function are known as actual arguments. The arguments used by the function are known as the formal arguments. In C, all arguments are passed by value, such that the formal argument is a copy of the actual argument.


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


What is the name given to the technique whereby a function argument can be modified by passing a pointer to the argument?

Call_by_reference


What is the difference between parameters and arguments in VB?

In programming languages, a parameter and an argument are the same thing; there is no actual difference between the two. Although a few languages do differentiate between an actual argument and a formal argument by calling one a parameter and the other an argument (or vice versa), the terms are universally interchangeable. That is; there is no single definition that applies to any one language, including Visual Basic. The language may have a convention, but there's no reason to follow that convention. Personally, I prefer the term argument and use the terms formal argument and actual argument whenever I need to specifically differentiate one from the other. In this way I can refer to them in a consistent but language-agnostic manner. Only a Pedant would argue that the terms parameter and argument have a specific meaning to a specific language, even when the creators of that language use the terms interchangeably themselves. To clarify, an actual argument is the argument being passed to a function while a formal argument is the argument that is used by the function. The two will always have the same value, but they are not the same argument. For instance, consider the following function definition: f (int a) { print a*2 } Whether we regard 'a' as being a parameter or an argument is immaterial -- it is a formal argument or formal parameter, whichever you prefer. The meaning is clarified by using the word "formal". Now consider the calling code: b = 42 f (b) Here, b is the actual argument (or actual parameter) being passed to the function f. Note that a and b are not the same variable or reference. That alone means there is no reason to differentiate them; the meaning of argument or parameter is implied by the context alone. It doesn't matter whether the function uses pass by value or pass by reference semantics. When passing arguments by value, a is simply a copy of b (independent variables with the same value). When passing by reference, a refers to the same memory address as b (a is an alias for b). In either case, the function uses the formal argument named a while the calling code uses the actual argument named b. In other words, the names are only accessible from within the scope in which they are declared, even if they refer to the same memory address. Of course, a function may pass one of its formal arguments to another function. Thus with respect to the calling function, its formal argument becomes an actual argument to the function being called.


What does sqrt function return?

square root of the argument

Related questions

Which term describes a function used as an argument for another function?

In Excel a function within another function would be called a nested function.


What is a argument in Microsoft Excel?

An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.An argument is the name for something used in a function in order for it to work. A SUM function needs something to sum, so you provide that. That is an argument. Most functions require arguments to work, though there are some, like TODAY() that don't need any arguments.


What is the z function?

it is used in complex function and used for studying the Riemann zeta-function along the important line where the real part of the argument is one-half.


Why it is not possible to pass a function as an argument to another function in c?

It is quite possible. A well-known example is the fourth parameter of qsort.


Can a function be an argument in another function in Excel Microsoft?

If the function allows multiple arguement, you can use another function within most functions. EXAMPLE: =IF(SUM(A1:A14)>120,SUM(A1:A14),"Oops! not enough")


What are the compsition of function?

A composition function, regarding two functions, is when you apply the first function on the second function on an argument. Bear in mind that a single, unaltered function is when you apply said function to an argument; a composition function simply applies the result of an application as an argument to another function. For example, if one function is defined as f(x) = x + 4 and another is defined as g(x) = 2x, the composition of the two (where f is applied to g) is f(g(x)) = 2x + 4. Note that composition is not commutative; that is, f(g(x)) is not necessarily equivalent to g(f(x)), unless if the functions are either the same or inverses of each other, in which case the result will be the argument; f(f-1(x)) = f-1(f(x)) = x.


What is meant by arguments in c?

Arguments appear in functions and in function calls. Arguments passed to a function are known as actual arguments. The arguments used by the function are known as the formal arguments. In C, all arguments are passed by value, such that the formal argument is a copy of the actual argument.


Why args0 is used in IntegerparseInt in Java?

It is the default argument name for all Java BIF (Built-In Function)s.


What does counter argument mean?

A counter argument is an argument made against another argument.


What are limits in maths?

Limits (or limiting values) are values that a function may approach (but not actually reach) as the argument of the function approaches some given value. The function is usually not defined for that particular value of the argument.


What happen when a c program passes an array as a function argument?

When an array name is passed as a function argument, the address of the first element is passed to the function. In a way, this is implicit call by reference. The receiving function can treat that address as a pointer, or as an array name, and it can manipulate the actual calling argument if desired.


What is a value that is substituted for the independent variable in a relationship or function?

It is called the argument of the function.