Pointer to Function

1

What is meaning of following declaration?
 int(*ptr[5])();

A. ptr is pointer to function.
B. ptr is array of pointer to function.
C. ptr is pointer to such function which return type is array.
D. ptr is pointer to array of function.

2

which of the following can be passed in function pointers?

A. variables
B. data types
C. functions
D. none of the mentioned

3

What are the mandatory part to present in function pointers?

A. &
B. retrun values
C. data types
D. none of the mentioned

4

What is the output of this program?

1.
    #include 
2.
    using namespace std;
3.
    int func (int a, int b)
4.
    {
5.
        cout << a;
6.
        cout << b;
7.
        return 0;
8.
    }
9.
    int main(void)
10.
    {
11.
        int(*ptr)(char, int);
12.
        ptr = func;
13.
        func(2, 3);
14.
        ptr(2, 3);
15.
        return 0;
16.
    }
A. 2323
B. 232
C. 23
D. compile time error

5

What is the output of this program?

1.
    #include 
2.
    using namespace std;
3.
    int n(char, int);
4.
    int (*p) (char, int) = n;
5.
    int main()
6.
    {
7.
        (*p)('d', 9);
8.
        p(10, 9);
9.
        return 0;
10.
    }
11.
    int n(char c, int i)
12.
    {
13.
        cout << c <<  i;
14.
        return 0;
15.
    }
A. d9 9
B. d9d9
C. d9
D. compile time error