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.

Machine Learning

More

Advertisement

Java Tutorial

More

UGC NET CS TUTORIAL

MFCS
COA
PL-CG
DBMS
OPERATING SYSTEM
SOFTWARE ENG
DSA
TOC-CD
ARTIFICIAL INT

C Programming

More

Python Tutorial

More

Data Structures

More

computer Organization

More
Top