Self Referential Structure in C

This C Tutorial explains Self Referential Structure in C Programming with examples. A self-referential structure in C is a structure that contains one or more pointers that point to the same type of structure as its member. Consider the structure declaration below, struct NODE { struct NODE new; /* ‘new’ declared variable */ int value; … Read more

advertisement

How to Access Members of a Structure in C?

Question: In What Different ways can we Access Members of a Structure in C Language? Answer: A structure, generally, comprises of one or more different types of members. For example, typedef struct NODE { struct NODE *link; int value; char add[50]; } Node; Let’s declare variables of ‘Node’ structure below, int main(void) { Node current; … Read more

advertisement

Difference between Structure Pattern, Template and Variable in C

Question: What is Difference Between Structure Pattern, Template and Variable in C Language? Answer: Consider the declaration given below, struct NODE { struct NODE *link; int value; }; The above declaration is called structure template or pattern. This declaration tells compiler, while compiling it, how to store members and makes the computer not to allocate … Read more

advertisement

Difference between Structure and Array in C

Question: What is Basic Difference Between an Array and a Structure in C? Answer: Though arrays and structures are composite data structures, they differ in various ways. An array is a sequence of elements of same type in consecutive memory locations. For example, int balloons[10]; float rainfall[N]; ‘balloons’ is an array of 10 integers in … Read more

advertisement
Subscribe to our Newsletters (Subject-wise). Participate in the Sanfoundry Certification contest to get free Certificate of Merit. Join our social networks below and stay updated with latest contests, videos, internships and jobs!

Youtube | Telegram | LinkedIn | Instagram | Facebook | Twitter | Pinterest
Manish Bhojasia - Founder & CTO at Sanfoundry
Manish Bhojasia, a technology veteran with 20+ years @ Cisco & Wipro, is Founder and CTO at Sanfoundry. He lives in Bangalore, and focuses on development of Linux Kernel, SAN Technologies, Advanced C, Data Structures & Alogrithms. Stay connected with him at LinkedIn.

Subscribe to his free Masterclasses at Youtube & discussions at Telegram SanfoundryClasses.