Self referential structures are those structures that contains a reference to data of its same type that is in addition to other data. A Self referential structures contain a pointer to the data that is of the same type.
Example:
struct department
{
char name[20];
struct department *d;
}
struct employee
{
int salary;
struct employee *e;
};
These types of self referential structures are more useful when you are working with complex with data like multidimensional objects.
0 comments :
Post a Comment
Note: only a member of this blog may post a comment.