

{"id":130504,"date":"2024-02-09T18:00:57","date_gmt":"2024-02-09T12:30:57","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=130504"},"modified":"2024-03-09T14:12:03","modified_gmt":"2024-03-09T08:42:03","slug":"different-types-of-pointers-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/","title":{"rendered":"Different Types of Pointers in C"},"content":{"rendered":"<p>Pointers in C are a fundamental concept that allows you to work directly with memory addresses. They serve as a powerful tool, enabling you to manipulate data and structures efficiently. However, improper use of pointers can lead to subtle and challenging-to-debug issues.<\/p>\n<p>In this guide, we will explore four important types of pointers in C: Dangling Pointers, Generic Pointers (Void Pointers), Null Pointers, and Wild Pointers.<\/p>\n<h2>Dangling Pointer in C<\/h2>\n<h3>1. De-allocation of Memory<\/h3>\n<p>A dangling pointer in C occurs when a pointer continues to reference a memory location after it has been deallocated or freed. This situation can lead to unexpected behavior and security vulnerabilities.<\/p>\n<p><strong>Consider the following code snippet:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdlib.h&gt;\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n    int* ptr = (int *)malloc(sizeof(int));\r\n    \r\n    \/\/ After the below free call, the pointer gets hanging.\r\n    free(ptr);\r\n\r\n    \/\/ No more dangling pointer\r\n    ptr = NULL;\r\n    \r\n    return 0;\r\n}<\/pre>\n<p>In this example, ptr initially points to a dynamically allocated memory location using malloc. However, after we call free(ptr), the memory is deallocated, and ptr becomes a dangling pointer. To avoid this, it&#8217;s a good practice to set dangling pointers to NULL.<\/p>\n<h3>2. Function Call<\/h3>\n<p>Another common scenario for creating dangling pointers is when a pointer points to a local variable that goes out of scope. Local variables are typically destroyed when the function they belong to exits.<\/p>\n<p><strong>Consider this example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint* fun() {\r\n    int x = 5;\r\n    return &amp;x;\r\n}\r\n\r\nint main() {\r\n    int* p = fun();\r\n    printf(\"%d\\n\", *p);\r\n    \r\n    return 0;\r\n}<\/pre>\n<p>In this case, p points to the local variable x. When the fun function exits, x goes out of scope, leaving p dangling. It&#8217;s essential to be cautious when returning pointers to local variables from functions.<\/p>\n<h3>3. Variable Goes Out of Scope<\/h3>\n<p>A similar situation to the one discussed earlier occurs when a variable goes out of scope, rendering a pointer dangling. <strong>Observe this code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void main() {\r\n   int *ptr;\r\n   \/\/ ...\r\n   {\r\n       int ch;\r\n       ptr = &amp;ch;\r\n   }\r\n }<\/pre>\n<p>In this example, ptr is assigned the address of ch, which is a local variable within an inner block. Once that block exits, ch goes out of scope, making ptr a dangling pointer. It&#8217;s crucial to be aware of the lifetimes of variables and pointers to avoid dangling situations.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2024\/02\/variable-goes-out-of-scope.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-134532 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2024\/02\/variable-goes-out-of-scope.webp\" alt=\"variable goes out of scope\" width=\"600\" height=\"315\" \/><\/a><\/p>\n<h3>Generic Pointer (Void Pointer) in C<\/h3>\n<p>A generic pointer, often referred to as a void pointer, is a versatile pointer type. It is not associated with any specific data type, making it suitable for handling various types of data. However, working with void pointers requires typecasting to access the actual data.<\/p>\n<h4>Characteristics of C Void Pointers<\/h4>\n<ul>\n<li><strong>Inability to Dereference Directly:<\/strong> You cannot directly dereference a void pointer because the compiler doesn&#8217;t know the type of data it points to.<\/li>\n<li><strong>No Pointer Arithmetic:<\/strong> Pointer arithmetic (e.g., incrementing or decrementing a pointer) is not possible on void pointers due to their lack of a concrete size.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdlib.h&gt;\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n    int x = 4;\r\n    float y = 5.5;\r\n    \r\n    void* ptr;\r\n    ptr = &amp;x;\r\n    \r\n    \/\/ Typecasting to int* before dereferencing\r\n    printf(\"Integer variable is = %d\\n\", *((int*)ptr));\r\n    \r\n    \/\/ Void pointer is now float\r\n    ptr = &amp;y;\r\n    \r\n    \/\/ Typecasting to float* before dereferencing\r\n    printf(\"Float variable is = %f\\n\", *((float*)ptr));\r\n    \r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nInteger variable is = 4<br \/>\nFloat variable is = 5.500000<\/p>\n<p>Here, we use void pointers to handle both int and float variables by typecasting them appropriately. This versatility can be valuable when writing generic functions or handling data of unknown types.<\/p>\n<h3>Null Pointer in C<\/h3>\n<p>A unique kind of pointer called a null pointer points to nothing. It is frequently employed to indicate that a pointer does not at the moment have a valid memory location.<\/p>\n<h4>Characteristics of C NULL Pointers<\/h4>\n<p>When we talk about an uninitialized pointer, it holds an unspecified value, while a null pointer holds a specified value that the system designates as an invalid address for any object or data.<\/p>\n<p>In the context of pointers, a null pointer represents a specific value, indicating the absence of a valid memory address, whereas a void pointer is a pointer type without a specific associated data type.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n    int *ptr = NULL;\r\n    \r\n    printf(\"The value of ptr is %p\\n\", ptr);\r\n    \r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\nThe value of ptr is (nil)<\/p>\n<p>In this example, ptr is initialized as a null pointer, meaning it doesn&#8217;t point to any valid memory location. Null pointers are helpful for indicating that a pointer is not currently referencing any data.<\/p>\n<h4>Use Cases of Null Pointers<\/h4>\n<p><strong>1. Initialization:<\/strong> To initialize a pointer variable when you don&#8217;t have a valid memory address to assign initially.<\/p>\n<p><strong>2. Function Arguments:<\/strong> When you don&#8217;t want to pass any valid memory address to a function, you can pass a null pointer.<\/p>\n<p><strong>3. Error Handling:<\/strong> Checking for null pointers before dereferencing them allows you to perform error handling in pointer-related code, preventing crashes and undefined behavior.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Use-Cases-of-Null-Pointers.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-130510 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Use-Cases-of-Null-Pointers.webp\" alt=\"Use Cases of Null Pointers\" width=\"400\" height=\"210\" \/><\/a><\/p>\n<h3>Wild Pointer in C<\/h3>\n<p>A wild pointer is a pointer that hasn&#8217;t been initialized to anything, not even NULL. It points to an arbitrary memory location, often containing garbage data. Dereferencing a wild pointer leads to undefined behavior and can crash your program.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int main() {\r\n    int *p; \/\/ wild pointer\r\n    *p = 5; \/\/ Oops!\r\n    \r\n    return 0;\r\n}<\/pre>\n<p>In this code, p is a wild pointer because it&#8217;s not initialized to any memory location. Attempting to dereference it like *p = 5; will result in undefined behavior, and your program may crash.<\/p>\n<h3>Comparison Table<\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Aspect<\/b><\/td>\n<td><b>Wild Pointer<\/b><\/td>\n<td><b>Null Pointer<\/b><\/td>\n<td><b>Dangling Pointer<\/b><\/td>\n<td><b>Generic Pointer<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Initialization<\/span><\/td>\n<td><span style=\"font-weight: 400\">Uninitialized<\/span><\/td>\n<td><span style=\"font-weight: 400\">Explicitly initialized to null<\/span><\/td>\n<td><span style=\"font-weight: 400\">Was previously initialized and valid<\/span><\/td>\n<td><span style=\"font-weight: 400\">Must be initialized before use<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Value<\/span><\/td>\n<td><span style=\"font-weight: 400\">Points to an arbitrary unknown location<\/span><\/td>\n<td><span style=\"font-weight: 400\">Evaluates to 0\/null constant<\/span><\/td>\n<td><span style=\"font-weight: 400\">Points to deallocated or invalid memory<\/span><\/td>\n<td><span style=\"font-weight: 400\">Points to object of generic type<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Validity<\/span><\/td>\n<td><span style=\"font-weight: 400\">Always invalid<\/span><\/td>\n<td><span style=\"font-weight: 400\">Valid &#8211; points to nothing<\/span><\/td>\n<td><span style=\"font-weight: 400\">It was valid but is now invalid<\/span><\/td>\n<td><span style=\"font-weight: 400\">Valid if properly initialized<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Safety<\/span><\/td>\n<td><span style=\"font-weight: 400\">Extremely dangerous &#8211; may corrupt memory<\/span><\/td>\n<td><span style=\"font-weight: 400\">Safe to use<\/span><\/td>\n<td><span style=\"font-weight: 400\">Dangerous &#8211; can cause crashes or corruption<\/span><\/td>\n<td><span style=\"font-weight: 400\">Safe if used correctly<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type checking<\/span><\/td>\n<td><span style=\"font-weight: 400\">No compile-time checking<\/span><\/td>\n<td><span style=\"font-weight: 400\">Checked at compile time<\/span><\/td>\n<td><span style=\"font-weight: 400\">No checking if memory is freed<\/span><\/td>\n<td><span style=\"font-weight: 400\">Dynamic type checking at runtime<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Usage<\/span><\/td>\n<td><span style=\"font-weight: 400\">Should never be dereferenced<\/span><\/td>\n<td><span style=\"font-weight: 400\">Used to indicate null object<\/span><\/td>\n<td><span style=\"font-weight: 400\">Should not be dereferenced after freeing<\/span><\/td>\n<td><span style=\"font-weight: 400\">Can point to objects of any type<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Conclusion<\/h3>\n<p>Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code. Always initialize your pointers and free memory when you&#8217;re done with it, and check for null pointers before using them. By mastering these concepts, you&#8217;ll harness the power of pointers while avoiding common pitfalls. Happy coding!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Pointers in C are a fundamental concept that allows you to work directly with memory addresses. They serve as a powerful tool, enabling you to manipulate data and structures efficiently. However, improper use of&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":131816,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[29951,23914,29133,2263,29950,29952,29554],"class_list":["post-130504","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-different-types-of-pointers","tag-c-programming","tag-c-tutorials","tag-c","tag-different-types-of-pointers-in-c","tag-types-of-pointers","tag-types-of-pointers-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Different Types of Pointers in C - DataFlair<\/title>\n<meta name=\"description\" content=\"Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Different Types of Pointers in C - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"DataFlair\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/DataFlairWS\/\" \/>\n<meta property=\"article:published_time\" content=\"2024-02-09T12:30:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-09T08:42:03+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/webp\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:site\" content=\"@DataFlairWS\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Different Types of Pointers in C - DataFlair","description":"Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code.","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:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Different Types of Pointers in C - DataFlair","og_description":"Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code.","og_url":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-02-09T12:30:57+00:00","article_modified_time":"2024-03-09T08:42:03+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp","type":"image\/webp"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"Different Types of Pointers in C","datePublished":"2024-02-09T12:30:57+00:00","dateModified":"2024-03-09T08:42:03+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/"},"wordCount":940,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp","keywords":["c different types of pointers","c programming","c tutorials","C++","different types of pointers in c","types of pointers","types of pointers in c"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/","url":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/","name":"Different Types of Pointers in C - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp","datePublished":"2024-02-09T12:30:57+00:00","dateModified":"2024-03-09T08:42:03+00:00","description":"Understanding the nuances of different pointer types in C is crucial for writing robust and error-free code.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/types-of-pointers-in-c-1.webp","width":1200,"height":628,"caption":"types of pointers in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/different-types-of-pointers-in-c\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog Home","item":"https:\/\/data-flair.training\/blogs\/"},{"@type":"ListItem","position":2,"name":"C Tutorials","item":"https:\/\/data-flair.training\/blogs\/category\/c-programming\/"},{"@type":"ListItem","position":3,"name":"Different Types of Pointers in C"}]},{"@type":"WebSite","@id":"https:\/\/data-flair.training\/blogs\/#website","url":"https:\/\/data-flair.training\/blogs\/","name":"DataFlair","description":"Learn Today. Lead Tomorrow.","publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/data-flair.training\/blogs\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/data-flair.training\/blogs\/#organization","name":"DataFlair","url":"https:\/\/data-flair.training\/blogs\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2016\/07\/Data-Flair.png","width":106,"height":48,"caption":"DataFlair"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/DataFlairWS\/","https:\/\/x.com\/DataFlairWS","https:\/\/www.linkedin.com\/company\/dataflair-web-services-pvt-ltd\/","https:\/\/www.youtube.com\/user\/DataFlairWS"]},{"@type":"Person","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49","name":"TechVidvan Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/c89190da3d4010c71ba476b618ab10fdc2335c82cdfa0ad5002d98d0f2473444?s=96&d=mm&r=g","caption":"TechVidvan Team"},"description":"TechVidvan Team provides high-quality content &amp; courses on AI, ML, Data Science, Data Engineering, Data Analytics, programming, Python, DSA, Android, Flutter, full stack web dev, MERN, and many latest technology.","url":"https:\/\/data-flair.training\/blogs\/author\/test001\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/130504","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/users\/86671"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=130504"}],"version-history":[{"count":10,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/130504\/revisions"}],"predecessor-version":[{"id":134534,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/130504\/revisions\/134534"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/131816"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=130504"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=130504"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=130504"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}