What is function pointer and where we will use it
Answers were Sorted based on User's Feedback
Answer / raghanna
A function pointer is a variable that stores the address of a function that can later be called through that function pointer. This is useful because functions encapsulate behavior. For instance, every time you need a particular behavior such as drawing a line, instead of writing out a bunch of code, all you need to do is call the function.
| Is This Answer Correct ? | 1 Yes | 0 No |
Answer / bsreddi
A function pointer is a type of pointer in C, C++ and other
C-like programming languages. When dereferenced, a function
pointer invokes a function, passing it zero or more
arguments just like a normal function. In programming
languages like C, function pointers can be used to simplify
code, such as replacing large switch statements.
| Is This Answer Correct ? | 5 Yes | 5 No |
What is difference between structure and union with example?
What is the benefit of using #define to declare a constant?
Why does not c have an exponentiation operator?
How do you write a program which produces its own source code as its output?
How can I set an array's size at run time?
Why is malloc used?
who did come first hen or agg
Is there sort function in c?
write a programme that inputs a number by user and gives its multiplication table.
What is output of the following program ? main() { i = 1; printf("%d %d %d\n",i,i++,i++); }
There is a mobile keypad with numbers 0-9 and alphabets on it. take input of 7 keys and then form a word from the alphabets present on those keys.
What does c value mean?