what is the use of call back function in c?tell me with
example

Answer Posted / kapil sharma

callback function as the name suggest is basically a
function which gets called at the run time. it is a
reference to the executable code or a part of executable
code which is passed as an argument to another function.
for e.g if we want to forcefully terminate a program but if
there is some essential data which will get lost if program
gets terminated instantly.in that case writing a callback is
always a good deal.
---before writing a callback function you must have
knowledge of function pointers.

Is This Answer Correct ?    7 Yes 6 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How a string is stored in c?

575


What is else if ladder?

603


How variables are declared in c?

563


Hi can anyone tell what is a start up code?

1606


Explain #pragma statements.

598






What is a method in c?

612


What are the types of pointers?

594


What is meant by realloc()?

666


differentiate built-in functions and user – defined functions.

611


What is the difference between union and anonymous union?

828


What is the explanation for cyclic nature of data types in c?

639


What is integer constants?

606


What is array of structure in c?

586


Can we declare variables anywhere in c?

567


What are near, far and huge pointers?

639