What is function pointer and where we will use it

Answers were Sorted based on User's Feedback



What is function pointer and where we will use it..

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

What is function pointer and where we will use it..

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

Post New Answer

More C Interview Questions

Which is best linux os?

0 Answers  


What is c standard library?

0 Answers  


Explain pointer. What are function pointers in C?

0 Answers   HCL,


difference between spiral and waterfall model

1 Answers  


write a C program: To recognize date of any format even formats like "feb-02-2003","02-february-2003",mm/dd/yy, dd/mm/yy and display it as mm/dd/yy.

0 Answers   Subex,






pick out the odd one out of the following a.malloc() b.calloc() c.free() d.realloc()

2 Answers   TCS, ZenQ,


write a program to fined second smallest and largest element in a given series of elements (without sorting)

9 Answers   Yahoo,


What are preprocessor directives?

0 Answers  


Explain the bubble sort algorithm.

0 Answers  


Write an efficient algo and C code to shuffle a pack of cards.. this one was a feedback process until we came up with one with no extra storage.

0 Answers  


Write a program that takes a 5 digit number and calculates 2 power that number and prints it.

1 Answers  


Write a program to find given number is even or odd without using any control statement.

2 Answers  


Categories