How do I initialize a pointer to a function?

Answers were Sorted based on User's Feedback



How do I initialize a pointer to a function?..

Answer / jaya prakash

return_type (*pointername)(arg list)

eg
void fnname();
void (*f)()=fnname;//ptr initialisation
//f is the poniter to fn printf

Is This Answer Correct ?    13 Yes 1 No

How do I initialize a pointer to a function?..

Answer / k.thejonath

void (*)f();
Here f if is pointer to a function having no arguments and
no return values.

Is This Answer Correct ?    7 Yes 8 No

Post New Answer

More C Interview Questions

What is queue in c?

0 Answers  


What is a class c rental property?

0 Answers  


program for swapping two strings by using pointers in c language

1 Answers  


What is data structure in c programming?

0 Answers  


Explain how does flowchart help in writing a program?

0 Answers  






what is the c source code for the below output? 10 10 10 10 10 10 10 10 10 10 9 9 7 6 6 6 6 6 6 9 7 5 9 7 3 2 2 5 9 7 3 1 5 9 7 3 5 9 7 4 4 4 4 5 9 7 8 8 8 8 8 8 8 8 9

0 Answers  


int i; i=2; i++; if(i=4) { printf(i=4); } else { printf(i=3); } output of the program ?

15 Answers   Mascot,


write a programme that inputs a number by user and gives its multiplication table.

2 Answers  


Write a program using two-dimensional array that lists the odd numbers and even numbers separately in a 12 input values.

1 Answers  


c program to compute AREA under integral

0 Answers   Infosys,


Why n++ execute faster than n+1 ?

2 Answers  


why the execution starts from main function

9 Answers  


Categories