Computer Programming
C Programming
C++ Programming

What is callback function in c?

575859

Top Answer
User Avatar
Wiki User
Answered
2009-02-13 16:34:15
2009-02-13 16:34:15

In computer programming, a callback is executable code that is passed as an argument to other code. It allows a lower-level software layer to call a function defined in a higher-level layer. Usually, the higher-level code starts by calling a function within the lower-level code passing to it a pointer or handle to another function. While the lower-level function executes, it may call the passed-in function any number of times to perform some subtask. In another scenario, the lower-level function registers the passed-in function as a handler that is to be called asynchronously by the lower-level at a later time in reaction to something. A callback can be used as a simpler alternative to polymorphism and generic programming, in that the exact behavior of a function can be dynamically determined by passing different (yet compatible) function pointers or handles to the lower-level function. This can be a very powerful technique for code reuse. Callback functions separate the caller from the callee, the caller doesn't care who the callee is For complete understanding we need to know about Function pointers in c. check the link below

012
๐Ÿ™
0
๐Ÿคจ
0
๐Ÿ˜ฎ
0
๐Ÿ˜‚
0

Related Questions


It can be done via its address, for example: void function (void (*callback)(void)) { (*callback)(); }

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

In computer programming, a callback is a mechanism that allows one function (the callback function) to be passed to another function (the callee) via an argument. The callback function may be a (pointer to) function, a function object reference or a llambda expression. The caller can then invoke the callee with different callbacks to obtain different results from the same function. As an example, a sorting algorithm will sort a sequence container in ascending order by default. It achieves this by invoking the less-than operator upon the container's elements to compare them. But if the element's do not have a less-than operator, or the user wants to sort the elements by some other order (such as descending order), they must provide a user-defined callback because the less-than operator is the default callback.

a callback is when you call someone back !!!

I love helping women to conceive. I will stay totally anonymous and all we need to do is get together to have sex. yahoo ID joe_cooolxxxnew Ajax.InPlaceEditor('cedit_2778809', '/ajax/edit_entry_comment.php', {rows:5,cols:60,callback: function(form, value) { return 'c=2778809&e=349722&comment=' + escape(value) }}); new Ajax.InPlaceEditor('cedit_2778809', '/ajax/edit_entry_comment.php', {rows:5,cols:60,callback: function(form, value) { return 'c=2778809&e=349722&comment=' + escape(value) }});

Learn how to use callback functions and the answer to the question should be evident.

The cast of The Callback - 2009 includes: David Youse

In computer science, a callback is executable code that is passed as an argument to other code. It allows a low level software layer to call a function occurring in a higher level layer. Usually the higher level code first calls a function within the lower level code passing to it a pointer or handle to another function. Then the lower level function in the course of executing may call the passed-in function any number of times to perform some subtask. Another option is that the lower level function registers the passed-in function as a handler that is to be called asynchronously by the lower level at a later time in reaction to something. A callback can be used as a simpler alternative to polymorphism and generic programming, in that the exact behavior of a function can be dynamically determined by passing different (yet compatible) function pointers or handles to the lower level function. This can be a very powerful technique for code reuse.

Callback - 2005 I was released on: USA: 1 December 2005 (limited)

The term callback in computer programming can have more than just one meaning. Mainly the term callback means a code that is an argument to another existing code.

Function overloading is a C++ thing, not a C thing.

You do not "get" a callback URL. The callback URL refers to the location of the server that is hosting your application. For instance, MyFBGame might be hosted at www.myfbgame.com. Some basic details can be found at http://developers.facebook.com/get_started.php.

Callback - 2006 was released on: USA: 9 May 2006 (Cakewalk Film Festival)

we can't define a function in c,because the compiler doesn't allow it.

It is a letter and function it.

There is no such term as "building function" in C++.

I don't use that function in C programme.

There aren't any operator functions in C. An operator function is a function that implements an operator overload. But C does not support overloads.

There is no such thing in C as 'formatted function' or 'unformatted function'.

The main function defines the entry point of an application in C.

Many (but not every) C programs have a main function.

Yes, C++ supports function pointers.

ASP.NET 2.0 includes a new Client Callback feature that enables you to retrieve page values and populate them to an already-generated page with out reconstructing page. This makes it possible to use on a page with out going through the entire post back cycle; that means you can update your pages without completely redrawing the page. see related links A callback is executable code that is passed as an argument to other code. It allows a lower-level software layer to call a subroutine (or function) defined in a higher-level layer. Callbacks have a wide variety of uses. For example, imagine a function that reads..

Callback - 2008 was released on: USA: 1 August 2010 (New York City, New York)

The c language does not have template functions. That is a c++ thing.


Copyright ยฉ 2020 Multiply Media, LLC. All Rights Reserved. The material on this site can not be reproduced, distributed, transmitted, cached or otherwise used, except with prior written permission of Multiply.