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 |
We can draw a box in cprogram by using only one printf();& without using graphic.h header file?
please explain every phase in the "SDLC" in the dotnet.
What is function prototype in c language?
What are all different types of pointers in c?
WRITE A PROGRAM TO FIND A REVERSE OF TWO NO
Why do we use main function?
What are valid operations on pointers?
A function 'q' that accepts a pointer to a character as argument and returns a pointer to an array of integer can be declared as: A)int (*q(char*)) [] B)int *q(char*) [] C)int(*q)(char*) [] D)None of the Above
Can a pointer be static?
If 4 digits number is input through the keyboard, Write a program to calculate sum of its 1st & 4th digit.
WAP to find that given no is small or capital
Explain zero based addressing.