Exercise: Complicated Declarations

Questions for: Complicated Declarations

Are the following declarations same?
char far *far *scr;
char far far** scr;
A:
Yes
B:
No
C:
D:
Answer: B
No answer description is available. Let's discuss.
Is the following declaration correct?
void(*f)(int, void(*)());
A:
Yes
B:
No
C:
D:
Answer: A
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.
Is the following declaration correct?
char far *far *ptr;
A:
Yes
B:
No
C:
D:
Answer: A
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
Is the following declaration correct?
char (* ( *f())[])();
A:
Yes
B:
No
C:
D:
Answer: A
f is a function that returns a pointer to an array of pointers to functions that return a char.
Is the following declaration correct?
typedef *void (*pfun)(**int, *float);
A:
Yes
B:
No
C:
D:
Answer: B
No answer description is available. Let's discuss.
Ad Slot (Above Pagination)
Quiz