Right Click to Search

Saturday, March 6, 2025

Pointer to Structure Within the same Structure : Self Referential



Pointer to Structure Within the same Structure : Self Referential

  1. In this Type , Structure has pointer to itself.
  2. Pointer stores the address of the Structure of same type.
Syntax :
struct node
{
int data;
struct node *ptr;  //Pointer to Struct node
};
  • Here ptr stores address of Structure node.
  • This is useful in Dynamic Memory Allocation and Creating Linked Lists.

Bookmark & Share

Tags / Keywords : | , ,

Stumble
Delicious
Technorati
Twitter
Facebook

0 Comments:

Post a Comment

Your Feedback :This is Growing Site and Your Feedback is important for Us to improve the Site performance & Quality of Content.Feel Free to contact and Please Provide Name & Contact Email

 

Learn C Programming Copyright © 2010 LKart Theme is Designed by Lasantha, Free Blogger Templates