Tuesday, 8 June 2021

Self referential structures in C

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.

Find Us On Facebook

python tutorial

More

C Programming

More

Java Tutorial

More

Data Structures

More

MS Office

More

Database Management

More
Top