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 |
Define a structure to store the record of library. The record must consist of at least following fields: Title, Author, Edition, Price, Publisher, and Category. -Define functions authorSearch ( ), TitleSearch ( ) and CategorySearch ( ) to search a book with respect to author, title and category. [There can be more than one book, written by one author, in one category]
How does C++ help with the tradeoff of safety vs. usability?
What is a string?
What are dynamically linked and statically linked libraries?
What are the types of pointers in c?
int i =10 main() { int i =20,n; for(n=0;n<=i;) { int i=10 i++; } printf("%d", i);
how to add two numbers without using arithmetic operators?
what is the difference between <stdio.h> and "stdio.h"
14 Answers Invendis, Kanbay, Mastek, MathWorks,
What are conditional operators in C?
How to add two numbers without using arithmetic operators?
18 Answers College School Exams Tests, e track, Infosys, Pan Parag, Sapient, TCS,
what is the need for main function in c?
please send me the code for multiplying sparse matrix using c