Yes / No Questions

Question 1 :

Is the following declaration correct?

typedef *void (*pfun)(**int, *float);


A). Yes
B). No
Answer : Option B

Question 2 :

Is the following declaration correct?

char (* ( *f())[])();


A). Yes
B). No
Answer : Option A

Explanation :

f is a function that returns a pointer to an array of pointers to functions that return a char.


Question 3 :

Is the following declaration correct?

char far *far *ptr;


A). Yes
B). No
Answer : Option A

Explanation :

ptr is a far pointer to a far pointer to a char. (or) ptr contains a far address of a far pointer to a char


Question 4 :

Is the following declaration correct?

void(*f)(int, void(*)());


A). Yes
B). No
Answer : Option A

Explanation :

f is a pointer to a function which returns nothing and receives as its parameter an integer and a pointer to a function which receives nothing and returns nothing.


Question 5 :

Are the following declarations same?

char far *far *scr;
char far far** scr;


A). Yes
B). No
Answer : Option B