What are function pointers? Provide an example.



What are function pointers? Provide an example...

Answer / nashiinformaticssolutions

Pointers to functions that allow dynamic invocation of functions. Example:
void (*funPtr)(int) = &printNumber;

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Interview Questions

What are external variables in c?

0 Answers  


what is difference between ANSI structure and C99 Structure?

1 Answers   Wipro,


I have one doubt. What does below statement mean? #define sizeof(operator) where operator can be int or float etc. Does this statement meaningful and where it can be used?

1 Answers  


what is the difference b/w NULL and null?

3 Answers   HSBC, IBM,


Write a programe print the sum of series 0,1,2,.....10

7 Answers  


Write a program to reverse a linked list in c.

0 Answers   DELL, HAL,


what is the difference between structure and union?

3 Answers  


Can you mix old-style and new-style function syntax?

0 Answers  


What is meant by preprocessor in c?

0 Answers  


Identify the correct argument for the function call fflush () in ANSI C: A)stdout B)stdin C)stderr D)All the above

5 Answers   Accenture, TCS,


why return type of main is not necessary in linux

0 Answers   TCS,


main() { int i; printf("%d",scanf"%d",&i))//if the input is 12 24 34 then wat will be the output }

2 Answers  


Categories