What is self-referential structure in C Programming?
Submitted by: AdministratorA self-referential structure is one of the data structures which refer to the pointer to (points) to another structure of the same type. For example, a linked list is supposed to be a self-referential data structure. The next node of a node is being pointed, which is of the same struct type. For example,
typedef struct listnode {
void *data;
struct listnode *next;
} linked_list;
In the above example, the listnode is a self-referential structure – because the *next is of the type sturct listnode.
Submitted by: Administrator
typedef struct listnode {
void *data;
struct listnode *next;
} linked_list;
In the above example, the listnode is a self-referential structure – because the *next is of the type sturct listnode.
Submitted by: Administrator
Read Online C Functions Job Interview Questions And Answers
Top C Functions Questions
☺ | What is self-referential structure in C Programming? |
☺ | Tell me what is NULL pointer in C? |
☺ | What is C Programming structure? |
☺ | Tell me what is the purpose of "register" keyword in C Language? |
☺ | What is function prototype in C Language? |
Top C Programming Categories
☺ | C Functions Interview Questions. |
☺ | C Pointers Interview Questions. |
☺ | C Preprocessor Interview Questions. |