This is my first posting on pointers.
Hope you would see series of related posts on pointers.
For any query on C language, send queries to
email : srenevas70@gmail.com, vsreenath2@gmail.com
This is from The C Programming Language - 5.12
1. int (*(*x[3])( ))[5];
What is The meaning of this declaration??
Sol:
Understanding the above declaration is easy once we follow this order.. the inner most loop to the outer most one.
a. consider *x[3];
which means we are creating three array of pointers
As these are pointers, to say the type to which they point to we made the outer declaration.
b. in general , int (*p())[5];
means p is a function which returns pointer to array with column size as 5.
on Combining a,b
we can say above declaration as
the array of pointers, each storing the address of the function returning pointer to an array of column size as 5.
No comments:
Post a Comment