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 |
write a program that types this pattern: 12345678987654321 12345678 87654321 1234567 7654321 123456 654321 12345 54321 1234 4321 123 321 12 21 1 1
What would happen to X in this expression: X += 15; (assuming the value of X is 5)
What is abstract data structure in c?
Does c have circular shift operators?
what is the purpose of the code, and is there any problem with the code? int f( int n, int l, int r ) { return (n << l) >> r; }
Want to know how to write a C program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.
When should the volatile modifier be used?
Given below are three different ways to print the character for ASCII code 88. Which is the correct way1) char c = 88; cout << c << " ";2) cout.put(88);3) cout << char(88) << " "; a) 1 b) 2 c) 3 d) constant
If a variable is a pointer to a structure, then which operator is used to access data members of the structure through the pointer variable?
Explain what is a 'locale'?
What are local variables c?
What is a static function in c?