C: Can you analyse the following statement? What is being printed?
Can you analyse the following statement? What is being printed?
printf ( "%d", ( x.a[i] )( p, q, r ) -> k ) ;
x is a structure variable. One of its elements is an array of pointers to functions. We are picking the ith pointer from this array. Using this pointer we are making a call to the function and passing it the arguments p, q, and r. The function in turn is returning a pointer to a structure, say z. We are printing an integer k which is an element of the structure z. Can you now write the prototype of the function being called?
The prototype would be:
struct z *f ( int p, int q, int r ) ;




Comments
Log in or create a user account to comment.