top button
Flag Notify
    Connect to us
      Facebook Login
      Site Registration

Facebook Login
Site Registration

C: What is self referential structure and when is it use ?

+4 votes
105 views
C: What is self referential structure and when is it use ?
posted Apr 20, 2016 by Vikram Singh

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

A self referential structure is nothing but a structure pointer pointing to itself.
It is used to create data structures like linked lists, stacks, etc. Below is an example of this kind of structure:

struct struct_name
{
int a;
char b;
struct_name * pointer_name;  // This is structure pointer defined inside structure only.
}; 
answer Apr 21, 2016 by Chirag Gangdev
Similar Questions
+5 votes

What is structure padding and how it is used at processor level?

+2 votes

I know about the forward declaration of structure but don't know when it should be used or preferrable ? I can't envision the scenario.

+2 votes

Can I assign one structure variable of another structure variable of same structure type all the time ?

Contact Us
+91 9880187415
sales@queryhome.net
support@queryhome.net
#280, 3rd floor, 5th Main
6th Sector, HSR Layout
Bangalore-560102
Karnataka INDIA.
QUERY HOME
...