C Programming - Structures, Unions, Enums - Discussion
Discussion Forum : Structures, Unions, Enums - Yes / No Questions (Q.No. 11)
11.
Can a structure can point to itself?
Answer: Option
Explanation:
A structure pointing to itself is called self-referential structures.
Discussion:
3 comments Page 1 of 1.
Shree Prakash said:
9 years ago
If one of the elements of a structure is the pointer to the same structure, then the structure is known as self-referential structure.
For example:-
struct jio {
char name[20];
float sal;
struct jio *e;
};
For example:-
struct jio {
char name[20];
float sal;
struct jio *e;
};
Nuzhat said:
1 decade ago
Self referential structure:
struct llist
{
int data;
struct llist *next;
};
Using pointer create self referential structure for eg linked-list.
struct llist
{
int data;
struct llist *next;
};
Using pointer create self referential structure for eg linked-list.
Sonal said:
1 decade ago
How? I want example.
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers