answersLogoWhite

0

It is exactly what it sounds like: a structure which contains a reference to itself. A common occurrence of this is in a structure which describes a node for a linked list. Each node needs a reference to the next node in the chain.

struct linked_list_node {

int data;

struct linked_list_node *next; // <- self reference

};

User Avatar

Wiki User

15y ago

What else can I help you with?

Continue Learning about Engineering

What is self referential function in c plus plus?

A self-referential function in C++, or in any other supporting language, is a recursive function.


How is the data structure of system R different from the relation structure?

Unlike Relational systems in System R ? Domains are not supported ? Enforcement of candidate key uniqueness is optional ? Enforcement of entity integrity is optional ? Referential integrity is not enforced


Can a Structure contain a Pointer to itself?

Yes, it is quite common. Example: struct List { struct List *Next; int value; } typedef struct List List; Example2: typedef struct Tree Tree; struct Tree { Tree *left,*right; int value; };


What is data structure why is an array called a data structure which are the other data structures?

A data structure is a collection of more than one elementary item, in some kind of aggregate organization. An array is a type of structure where more than one item of the same type are arranged serially in memory, and accessed using an index. The item can either be an elementary type or it itself can be a structure type. A struct (not to be confused with the use of "structure" in this answer) is a type of structure where more than one item of the same or different types are arranged serially in memory, and accessed using the structure member (.) operator. A union is similar to a struct, except that each member occupies the same address. This means that only one type of data can be stored at any one time in a union. A self-referential structure is a type of structure, usually constructed of simpler structures, linked together with some kind of pointer scheme. Examples of this are the linked list and tree.


Advantage and disadvantage of linked list?

Linked list is a dynamic data structure that contains a "link" to the structure containing the next item. It is a collection of structures ordered not by their physical placement in memory (like array) but by logical links that are stored as part of the data in the structure itself.Advantages of Linked Lists- Dynamic structure (Mem. Allocated at run-time).- We can have more than one datatype.- Re-arrange of linked list is easy (Insertion-Deletion).- It doesn't waste memory.Disadvantages of Linked Lists- In linked list, if we want to access any node it is difficult.- It is occupying more memory.

Related Questions

What is self referential function in c plus plus?

A self-referential function in C++, or in any other supporting language, is a recursive function.


Do you ever have an answer?

As an example in self-referential paradox, the answer is NO!


What a structure must include if it is a self -referential structure in C programming?

Pointer, eg: struct Person { struct Person *father, *mother, *spouse; int age; char *name; };


How do you use self referential structure?

Like any other structure. Example:typedef struct Example {struct Example *next;} Example;Example e1, e2;e1.next= &e2;e2.next= NULL;


What does the suffix meta mean?

The suffix &quot;meta&quot; means beyond, transcending, or self-referential. It is often used to indicate something that is of a higher level or involving a critical examination of its own structure or underlying assumptions.


What is referential class in c?

C is not an object-oriented language so it doesn't have classes of have any kind, it only has types. However, a self-referential type is simply a type that refers to itself. Nodes in a linked list are self-referential types because they hold a reference (a pointer) to the next node in the list: typedef struct node {node* next;/* ... */};


What is The tendency to process efficiently and remember well information related to oneself is called the?

self-reference effect


What is contextual criticism?

A form of criticism which views the literary text as a self-contained verbal structure. Akin to the New_Criticism, contextualism holds that a work of art generates self-referential meanings within its own internal and autonomous context. Its proponents include Cleanth Brooks, Eliseo Vivas, and Murray Krieger.


What does that's so meta mean?

It means it's self referential. For example, if someone were to ask a question on Answers.com regarding Answers.com itself, that would be so meta.


Can you explain the concept of CTMU in simple terms?

The CTMU, or Cognitive-Theoretic Model of the Universe, is a theory that suggests the universe is a self-processing, self-referential system. It proposes that reality is a kind of mind-like structure that processes information to create the world we perceive. In simpler terms, it's a theory that tries to explain how the universe works by comparing it to a giant, self-aware computer.


What are non-referential words?

Non-referential words are words that do not have a specific or concrete meaning on their own and instead serve a grammatical function in a sentence. Examples include pronouns (he, she, it) and conjunctions (and, but, or). These words help to connect and structure sentences but do not refer to specific entities or concepts.


What is the difference between a shell structure and a frame structure?

A shell structure supports its self and a frame structure does not support it self.