C++ Pointers & Functions Question:
Download Questions PDF

What is meaning of following declaration?
int(*p[5])();
a) p is pointer to function.
b) p is array of pointer to function.
c) p is pointer to such function which return type is array.
d) p is pointer to array of function

Answer:

b) p is array of pointer to function.

Download C++ Pointers & Functions Interview Questions And Answers PDF

Previous QuestionNext Question
What is size of generic pointer in c?
a) 0
b) 1
c) 2
d) Null
What is the output of this program?

#include <iostream>
using namespace std;
int main()
{
int a[2][4] = {3, 6, 9, 12, 15, 18, 21, 24};
cout << *(a[1] + 2) << *(*(a + 1) + 2) << 2[1[a]];
return 0;
}
a) 15 18 21
b) 21 21 21
c) 24 24 24
d) Compile time error