+1 vote
22 views
What is a pointer to a function? Give the general syntax for the same in C Programming?
in Technology by (189k points)

1 Answer

0 votes

A pointer holding the reference of the function is called pointer to a function. In general it is declared as follows.

T (*fun_ptr) (T1,T2…); Where T is any date type.

Once fun_ptr refers a function the same can be invoked using the pointer as follows.

fun_ptr();

[Or]

(*fun_ptr)();

by (189k points)

Related questions

+1 vote
1 answer 19 views
0 votes
1 answer 29 views
29 views asked Nov 8, 2020 in Technology by JackTerrance (189k points)
0 votes
1 answer 13 views
+1 vote
1 answer 11 views
+1 vote
1 answer 14 views
+1 vote
1 answer 13 views
+1 vote
1 answer 12 views
0 votes
1 answer 10 views
0 votes
1 answer 11 views
+1 vote
1 answer 10 views
10 views asked Nov 9, 2020 in Technology by JackTerrance (189k points)
+1 vote
1 answer 42 views
+1 vote
1 answer 12 views
+1 vote
1 answer 6 views
+1 vote
1 answer 11 views
11 views asked Nov 9, 2020 in Technology by JackTerrance (189k points)
+1 vote
1 answer 95 views
...