Interview Questions Answers.ORG
Interviewer And Interviewee Guide
Interviews
Quizzes
Home
Quizzes
Interviews C Programming Interviews:C FunctionsC PointersC Preprocessor
Copyright © 2018. All Rights Reserved
C Functions Interview Question:
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
Copyright 2007-2024 by Interview Questions Answers .ORG All Rights Reserved.
https://InterviewQuestionsAnswers.ORG.
https://InterviewQuestionsAnswers.ORG.