in Technology by
What is a pointer to a function? Give the general syntax for the same in C Programming?

1 Answer

0 votes
by

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)();

Related questions

0 votes
    The first general election was postponed twice. Give two reasons for the same. Select the correct answer from above options...
asked Aug 3, 2022 in Education by JackTerrance
+1 vote
    Which built-in function can be used to move the file pointer internally in C Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    Which type of pointer is the most convenient way of storing the raw address in C programming?...
asked Jan 23, 2021 in Technology by JackTerrance
+1 vote
    Which operator can be used to access union elements if union variable is a pointer variable in C Programming ?...
asked Nov 9, 2020 in Technology by JackTerrance
+1 vote
    Can a pointer access the array in C Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
+1 vote
    What is NULL Pointer in C Programming?...
asked Nov 9, 2020 in Technology by JackTerrance
+1 vote
    What are the ways to a null pointer that can be used in the C programming language?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    What is a pointer on a pointer in C programming language?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    What is the description for syntax errors in C Programming?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    What is the general form of function in C?...
asked Nov 8, 2020 in Technology by JackTerrance
0 votes
    How to declare a pointer to a function in C?...
asked Jan 22, 2021 in Technology by JackTerrance
0 votes
    function add() and operator + gives the same result true Or f plzzzz give me answer fast……. dud Select the correct answer from above options...
asked Dec 31, 2021 in Education by JackTerrance
+1 vote
    Can variables belonging to different scope have same name in C Programming? If so show an example ?...
asked Nov 9, 2020 in Technology by JackTerrance
0 votes
    The ADT list is more general than common lists and has entries that are objects of the same type. Select the correct answer from above options...
asked Nov 26, 2021 in Education by JackTerrance
0 votes
    What are the general description for loop statements and available loop types in C?...
asked Nov 8, 2020 in Technology by JackTerrance
...