{"id":3174,"date":"2021-06-11T13:46:00","date_gmt":"2021-06-11T08:16:00","guid":{"rendered":"https:\/\/manorinfinity.com\/blog\/self-referential-structure-in-c-bitsofcs\/"},"modified":"2021-06-11T13:46:00","modified_gmt":"2021-06-11T08:16:00","slug":"self-referential-structure-in-c-bitsofcs","status":"publish","type":"post","link":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/","title":{"rendered":"Self Referential Structure In C | BitsOfCS"},"content":{"rendered":"<div style=\"clear: both; text-align: left;\"><span><\/p>\n<div style=\"clear: both; text-align: left;\"><span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><span style=\"font-family: courier; font-size: large; white-space: pre-wrap;\">In C language when a structure is referring or pointing to the structure of the same type, then it is called &#8216;self referential structure&#8217;.&nbsp;<\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example of a structure-&nbsp;<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><b style=\"font-weight: normal;\"><span style=\"font-family: courier; font-size: large;\"><br \/><\/span><\/b><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"border: none; display: inline-block; height: 247px; overflow: hidden; width: 371px;\"><span style=\"font-family: courier; font-size: large;\"><img loading=\"lazy\" decoding=\"async\" height=\"247\" src=\"https:\/\/lh6.googleusercontent.com\/nuDbW0cR87tylaG3-14skuubvRHfCnX4TpN7MW36SqKAUDBCmeYfRzOeDAaAkMGgUHsIO384uMuQxmk10BqgBf030ySc1EMeiFy3eO5dc1fTvYefy3Sxb1mPh3qC588xZl69_sLF\" style=\"margin-left: 0px; margin-top: 0px;\" width=\"371\" \/><\/span><\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example of a self referential structure-<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><b style=\"font-weight: normal;\"><span style=\"font-family: courier; font-size: large;\"><br \/><\/span><\/b><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: center;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"border: none; display: inline-block; height: 217px; overflow: hidden; width: 411px;\"><span style=\"font-family: courier; font-size: large;\"><img loading=\"lazy\" decoding=\"async\" height=\"217\" src=\"https:\/\/lh3.googleusercontent.com\/ScL2BFQotin5sgJ7v1M8tN4gW55AEEB4QQmKD-ry3UEgor0g9-rfjirDknQO8LGfS6cRSDty_VrMeJMCY7CxUzloKdo6_yjpIIE4d0fdUKiqs3AdfAoiG-xWvq9TC-1TtQcd8pKw\" style=\"margin-left: 0px; margin-top: 0px;\" width=\"411\" \/><\/span><\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 12pt; margin-top: 12pt;\"><span style=\"font-family: courier; font-size: large;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\">Here, <\/span><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\">*link <\/span><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\">is a pointer to the structure of type &#8216;manu&#8217;. Hence, it is a self referential structure.&nbsp;<\/span><\/span><\/p>\n<h2 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Uses of Self Referential Structure:<\/span><\/span><\/h2>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Self referential structures are used in order to build some other complex data structures.<\/span><\/span><\/p>\n<ol style=\"margin-bottom: 0px; margin-top: 0px; padding-inline-start: 48px;\">\n<li aria-level=\"1\" dir=\"ltr\" style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;\">\n<p dir=\"ltr\" role=\"presentation\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">&nbsp;Linked List<\/span><\/span><\/p>\n<\/li>\n<li aria-level=\"1\" dir=\"ltr\" style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;\">\n<p dir=\"ltr\" role=\"presentation\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">&nbsp;Stack<\/span><\/span><\/p>\n<\/li>\n<li aria-level=\"1\" dir=\"ltr\" style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;\">\n<p dir=\"ltr\" role=\"presentation\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">&nbsp;Queue<\/span><\/span><\/p>\n<\/li>\n<li aria-level=\"1\" dir=\"ltr\" style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;\">\n<p dir=\"ltr\" role=\"presentation\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">&nbsp;Tree<\/span><\/span><\/p>\n<\/li>\n<li aria-level=\"1\" dir=\"ltr\" style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; list-style-type: decimal; text-decoration: none; vertical-align: baseline; white-space: pre;\">\n<p dir=\"ltr\" role=\"presentation\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">&nbsp;Graph<\/span><\/span><\/p>\n<\/li>\n<\/ol>\n<h2 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 18pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Types of Self Referential Structure:&nbsp;<\/span><\/span><\/h2>\n<h3 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 14pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">1. Self Referential Structure With Single Link:<\/span><\/span><\/h3>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">These types of self referential structures can have only one pointer that refers to or pointing to the same structure.&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example:<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><b style=\"font-weight: normal;\"><span style=\"font-family: courier; font-size: large;\"><br \/><\/span><\/b><\/p>\n<h3 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 14pt; text-align: center;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"border: none; display: inline-block; height: 273px; overflow: hidden; width: 566px;\"><span style=\"font-family: courier; font-size: large;\"><img loading=\"lazy\" decoding=\"async\" height=\"273\" src=\"https:\/\/lh3.googleusercontent.com\/qxlEVRYwGAgJp9HjWtxRdf9UnZhN5246I5hNJlInMSAYXZBQLmRLnQTYYFU5DPzGGPkWfPCcmiHoYh5rvqd8Bg-j97AFFa_akvl3X0OPl0Cu1by7QXYxDDjayxTwhnzh0x-u_S-R\" style=\"margin-left: 0px; margin-top: 0px;\" width=\"566\" \/><\/span><\/span><\/span><\/h3>\n<h3 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 14pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Hence output of the above example will be &#8217;20&#8217;.<\/span><\/span><\/h3>\n<h3 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 14pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 700; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">2. Self Referential Structure With Multiple Link:<\/span><\/span><\/h3>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">These types of self referential structures can have more than one pointer that refers to or pointing to the same structure.&nbsp;<\/span><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Example:<\/span><\/span><\/p>\n<p><span style=\"font-family: courier; font-size: large;\"><\/span><\/p>\n<p dir=\"ltr\" style=\"line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><b style=\"font-weight: normal;\"><span style=\"font-family: courier; font-size: large;\"><br \/><\/span><\/b><\/p>\n<div style=\"clear: both; text-align: center;\"><span style=\"font-family: courier; font-size: large;\"><img data-recalc-dims=\"1\" height=\"123\" width=\"300\" decoding=\"async\" border=\"0\" data-original-height=\"233\" data-original-width=\"566\" src=\"https:\/\/i0.wp.com\/explore.techenutia.com\/wp-content\/uploads\/2021\/06\/st-2B-25286-2529-300x123.png?resize=300%2C123&#038;ssl=1\" \/><\/span><\/div>\n<p dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 0pt; margin-top: 0pt;\"><span style=\"background-color: transparent; color: black; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\"><span style=\"font-family: courier; font-size: large;\">Hence output of the above example will be &#8217;20<span>&nbsp;&nbsp; &nbsp;10<\/span>&#8216;.<\/span><\/span><\/p>\n<h3 dir=\"ltr\" style=\"line-height: 1.656; margin-bottom: 4pt; margin-top: 14pt;\"><span><span style=\"background-color: transparent; color: black; font-family: courier; font-size: large; font-style: normal; font-variant: normal; font-weight: 400; text-decoration: none; vertical-align: baseline; white-space: pre-wrap;\">If you find any problem related to this article, please comment below or contact me <a href=\"https:\/\/www.bitsofcs.xyz\/p\/contact-me.html\" target=\"_blank\" rel=\"noopener noreferrer\">here<\/a>.<\/span><\/span><\/h3>\n<p dir=\"ltr\" style=\"font-size: xx-large; line-height: 1.38; margin-bottom: 0pt; margin-top: 0pt; text-align: left;\"><\/p>\n<p><\/span><\/div>\n<p><\/span><\/div>\n","protected":false},"excerpt":{"rendered":"<p>In C language when a structure is referring or pointing to the structure of the same type, then it is called &#8216;self referential structure&#8217;.&nbsp; Example of a structure-&nbsp; Example of a self referential structure- Here, *link is a pointer to the structure of type &#8216;manu&#8217;. Hence, it is a self&#8230;<\/p>\n<div class=\"more-link-wrapper\"><a class=\"more-link\" href=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\">Read the post<span class=\"screen-reader-text\">Self Referential Structure In C | BitsOfCS<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":3210,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-3174","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-infinity-fitness","excerpt","zoom","full-without-featured","even","excerpt-0"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v20.12 (Yoast SEO v26.8) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Self Referential Structure In C | BitsOfCS | ManOrInfinity<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Self Referential Structure In C | BitsOfCS\" \/>\n<meta property=\"og:description\" content=\"In C language when a structure is referring or pointing to the structure of the same type, then it is called &#8216;self referential structure&#8217;.&nbsp; Example of a structure-&nbsp; Example of a self referential structure- Here, *link is a pointer to the structure of type &#8216;manu&#8217;. Hence, it is a self&#8230;\" \/>\n<meta property=\"og:url\" content=\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\" \/>\n<meta property=\"og:site_name\" content=\"ManOrInfinity\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-11T08:16:00+00:00\" \/>\n<meta name=\"author\" content=\"manorinfinity\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@manorinfinity\" \/>\n<meta name=\"twitter:site\" content=\"@manorinfinity\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"manorinfinity\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\"},\"author\":{\"name\":\"manorinfinity\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"headline\":\"Self Referential Structure In C | BitsOfCS\",\"datePublished\":\"2021-06-11T08:16:00+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\"},\"wordCount\":193,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"image\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage\"},\"thumbnailUrl\":\"\",\"articleSection\":[\"Infinity Fitness\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\",\"url\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\",\"name\":\"Self Referential Structure In C | BitsOfCS | ManOrInfinity\",\"isPartOf\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage\"},\"thumbnailUrl\":\"\",\"datePublished\":\"2021-06-11T08:16:00+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage\",\"url\":\"\",\"contentUrl\":\"\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/manorinfinity.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Self Referential Structure In C | BitsOfCS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#website\",\"url\":\"https:\/\/manorinfinity.com\/blog\/\",\"name\":\"ManOrInfinity\",\"description\":\"Thrive towards greatness\",\"publisher\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/manorinfinity.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":[\"Person\",\"Organization\"],\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901\",\"name\":\"manorinfinity\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png\",\"contentUrl\":\"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png\",\"width\":282,\"height\":260,\"caption\":\"manorinfinity\"},\"logo\":{\"@id\":\"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/\"},\"description\":\"Complex Problem Solver, Outloud Thinker, An Outstanding Writer, and a very curious human being\",\"sameAs\":[\"http:\/\/manorinfinity.com\"],\"url\":\"https:\/\/manorinfinity.com\/blog\/author\/manorinfinity\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Self Referential Structure In C | BitsOfCS | ManOrInfinity","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/","og_locale":"en_US","og_type":"article","og_title":"Self Referential Structure In C | BitsOfCS","og_description":"In C language when a structure is referring or pointing to the structure of the same type, then it is called &#8216;self referential structure&#8217;.&nbsp; Example of a structure-&nbsp; Example of a self referential structure- Here, *link is a pointer to the structure of type &#8216;manu&#8217;. Hence, it is a self&#8230;","og_url":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/","og_site_name":"ManOrInfinity","article_published_time":"2021-06-11T08:16:00+00:00","author":"manorinfinity","twitter_card":"summary_large_image","twitter_creator":"@manorinfinity","twitter_site":"@manorinfinity","twitter_misc":{"Written by":"manorinfinity","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#article","isPartOf":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/"},"author":{"name":"manorinfinity","@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"headline":"Self Referential Structure In C | BitsOfCS","datePublished":"2021-06-11T08:16:00+00:00","mainEntityOfPage":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/"},"wordCount":193,"commentCount":0,"publisher":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"image":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage"},"thumbnailUrl":"","articleSection":["Infinity Fitness"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/","url":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/","name":"Self Referential Structure In C | BitsOfCS | ManOrInfinity","isPartOf":{"@id":"https:\/\/manorinfinity.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage"},"image":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage"},"thumbnailUrl":"","datePublished":"2021-06-11T08:16:00+00:00","breadcrumb":{"@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#primaryimage","url":"","contentUrl":""},{"@type":"BreadcrumbList","@id":"https:\/\/manorinfinity.com\/blog\/2021\/06\/11\/self-referential-structure-in-c-bitsofcs\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/manorinfinity.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Self Referential Structure In C | BitsOfCS"}]},{"@type":"WebSite","@id":"https:\/\/manorinfinity.com\/blog\/#website","url":"https:\/\/manorinfinity.com\/blog\/","name":"ManOrInfinity","description":"Thrive towards greatness","publisher":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/manorinfinity.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":["Person","Organization"],"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/1172b1895b5eb7e49cc8640e49255901","name":"manorinfinity","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/","url":"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png","contentUrl":"http:\/\/manorinfinity.com\/wp-content\/uploads\/2023\/06\/moi-logo.png","width":282,"height":260,"caption":"manorinfinity"},"logo":{"@id":"https:\/\/manorinfinity.com\/blog\/#\/schema\/person\/image\/"},"description":"Complex Problem Solver, Outloud Thinker, An Outstanding Writer, and a very curious human being","sameAs":["http:\/\/manorinfinity.com"],"url":"https:\/\/manorinfinity.com\/blog\/author\/manorinfinity\/"}]}},"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_likes_enabled":true,"_links":{"self":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts\/3174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/comments?post=3174"}],"version-history":[{"count":0,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/posts\/3174\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/"}],"wp:attachment":[{"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/media?parent=3174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/categories?post=3174"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/manorinfinity.com\/blog\/wp-json\/wp\/v2\/tags?post=3174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}