

{"id":120574,"date":"2024-01-03T18:00:37","date_gmt":"2024-01-03T12:30:37","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120574"},"modified":"2024-01-03T18:26:25","modified_gmt":"2024-01-03T12:56:25","slug":"nested-for-loop-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/","title":{"rendered":"Nested For Loop in C with Examples"},"content":{"rendered":"<p>Loops allow us to repeatedly execute code in an efficient manner. They form an integral part of programming across languages. In C, we have tools like the humble for loop to perform repetitive tasks. But what if we need more complexity? This is where nested loops come in.<\/p>\n<p>Nested loops involve placing one loop within another loop. This provides an avenue to add more advanced logic by combining multiple iterative processes. Nesting two or more for loops can be extremely useful for solving certain categories of problems. This article will demonstrate how to implement nested for loops in C through simple, beginner-friendly examples.<\/p>\n<h2>Understanding Nested For Loops in C<\/h2>\n<p>A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop. This means the inner loop cycle controls the total number of times the inner loop body runs.<\/p>\n<p><strong>The syntax will look like:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">for (init; condition; increment) {\r\n   for (init; condition; increment) {\r\n      \/\/ inner loop \r\n   }\r\n\r\n   \/\/ outer loop\r\n}<\/pre>\n<p>The outer and inner loops will each have their own control variables and conditions. The key point is that the inner loop falls inside the outer loop&#8217;s body.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c-1.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120790 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c-1.webp\" alt=\"nested for loop in c\" width=\"600\" height=\"500\" \/><\/a><\/p>\n<h3>Working of Nested for Loops in C<\/h3>\n<p><strong>To understand how nested for loops work, let&#8217;s break down their execution flow:<\/strong><\/p>\n<ul>\n<li>The outer loop initializes and begins iterating.<\/li>\n<li>Inner loop initialization occurs after each iteration of the outer loop.<\/li>\n<li>The inner loop executes its iterations completely.<\/li>\n<li>Control returns to the outer loop for its next iteration.<\/li>\n<li>Steps 2-4 repeat until outer loop condition becomes false.<\/li>\n<li>When outer loop terminates, nested loop execution ends.<\/li>\n<\/ul>\n<p>So essentially, the outer loop controls the overall number of times the inner loop repeats. The inner loop runs all its iterations for each single iteration of the outer loop.<\/p>\n<p>We can think of it as nested Matryoshka dolls &#8211; the largest doll contains smaller dolls nested within it. Similarly, the outer loop contains the inner loop.<\/p>\n<p>Understanding this top-down execution flow is crucial to designing effective nested loops. The outer loop governs the overall process, while the inner loop focuses on its own iterative task.<\/p>\n<h3>Advantages of C Nested For Loops<\/h3>\n<p><strong>Nested loops provide advantages like:<\/strong><\/p>\n<ul>\n<li>Ability to address complex problems by adding loop layers<\/li>\n<li>Simplifying complex repetitive tasks through hierarchical loops<\/li>\n<li>Enhanced multi-dimensional iteration capabilities<\/li>\n<\/ul>\n<h3>Examples and Walkthroughs<\/h3>\n<h4>Example 1: Printing a Rectangle<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  \r\n  int i, j;\r\n\r\n  for (i=1; i&lt;=5; i++) {\r\n    for (j=1; j&lt;=10; j++) {\r\n      printf(\"*\"); \r\n    }\r\n    printf(\"\\n\");\r\n  }\r\n  return 0;  \r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n*********<br \/>\n*********<br \/>\n*********<br \/>\n*********<br \/>\n*********<\/p>\n<h4>Example 1 &#8211; Printing a Rectangle:<\/h4>\n<ul>\n<li>This code uses nested for loops to print a solid rectangle pattern.<\/li>\n<li>By iterating over variable i, the outer loop regulates the number of rows.<\/li>\n<li>The inner loop handles columns by iterating j and printing asterisks.<\/li>\n<li>Printing a newline after the inner loop completes each row.<\/li>\n<\/ul>\n<h4>Example 2: Counting Coins<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  int quarters, dimes, nickels, pennies, total;\r\n\r\n  for (quarters = 0; quarters &lt;= 2; quarters++) {\r\n    for (dimes = 0; dimes &lt;= 4; dimes++) {\r\n      for (nickels = 0; nickels &lt;= 10; nickels++) {\r\n        for (pennies = 0; pennies &lt;= 20; pennies++) {\r\n\r\n          total = quarters * 25 + dimes * 10 + nickels * 5 + pennies;\r\n\r\n          printf(\"Quarters: %d Dimes: %d Nickels: %d Pennies: %d Total: %d\\n\", quarters, dimes, nickels, pennies, total);\r\n        }  \r\n      }\r\n    }\r\n  }\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n<strong>Quarters:<\/strong> 0 Dimes: 0 Nickels: 0 Pennies: 0 Total: 0<br \/>\n<strong>Quarters:<\/strong> 0 Dimes: 0 Nickels: 0 Pennies: 1 Total: 1<br \/>\n&#8230;<br \/>\n<strong>Quarters:<\/strong> 2 Dimes: 4 Nickels: 10 Pennies: 20 Total: 215<\/p>\n<h4>Example 2 &#8211; Counting Coins:<\/h4>\n<ul>\n<li>This code tallies the total coin value using 4 nested for loops.<\/li>\n<li>Each loop iterates through a range of values for quarters, dimes, nickels, and pennies.<\/li>\n<li>The total variable computes the running total for each combination.<\/li>\n<li>Print statement displays the breakdown of coins counted and their total value.<\/li>\n<\/ul>\n<h4>Example 3: Temperature Conversion Table<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  int celsius, fahrenheit;\r\n\r\n  for (celsius = 0; celsius &lt;= 100; celsius += 10) {\r\n\r\n    fahrenheit = (celsius * 9\/5) + 32;\r\n\r\n    printf(\"%d Celsius = %d Fahrenheit\\n\", celsius, fahrenheit);\r\n\r\n  }\r\n\r\n  return 0;\r\n\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n0 Celsius = 32 Fahrenheit<br \/>\n10 Celsius = 50 Fahrenheit<br \/>\n20 Celsius = 68 Fahrenheit<br \/>\n&#8230;<br \/>\n100 Celsius = 212 Fahrenheit<\/p>\n<h4>Example 3 &#8211; Temperature Conversion Table:<\/h4>\n<ul>\n<li>The outer loop steps through a range of Celsius values.<\/li>\n<li>The formula converts each Celsius to Fahrenheit in the inner loop.<\/li>\n<li>Fahrenheit value is printed alongside the corresponding Celsius.<\/li>\n<li>Table is built by iterating through Celsius range and converting each value.<\/li>\n<\/ul>\n<h4>Example 4 &#8211; Printing a Right Triangle Pattern:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ C program to print a right triangle pattern  \r\n\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  int rows, i, j;\r\n\r\n  printf(\"Enter number of rows: \");\r\n  scanf(\"%d\", &amp;rows);\r\n\r\n  for(i=1; i&lt;=rows; ++i) {\r\n    for(j=1; j&lt;=i; ++j) {\r\n      printf(\"*\"); \r\n    }\r\n    printf(\"\\n\");\r\n  }\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Enter number of rows:<\/strong> 5<br \/>\n*<br \/>\n**<br \/>\n***<br \/>\n****<br \/>\n*****<\/p>\n<h4>Example 5 &#8211; Finding Prime Numbers:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ C program to print prime numbers between 1 to n\r\n\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  int n, i, j, isPrime;\r\n\r\n  printf(\"Enter a positive integer: \");\r\n  scanf(\"%d\", &amp;n);\r\n\r\n  for(i=2; i&lt;=n; i++) {\r\n    isPrime = 1;\r\n\r\n    for(j=2; j&lt;=i\/2; j++) {\r\n      if(i%j == 0) {\r\n        isPrime = 0;\r\n        break;  \r\n      }\r\n    }\r\n\r\n    if(isPrime == 1) {\r\n      printf(\"%d \", i);\r\n    }\r\n  }\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Enter a positive integer:<\/strong> 10<br \/>\n2 3 5 7<\/p>\n<h4>Example 6 &#8211; Multiplication Table:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Print multiplication table of a given number  \r\n\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  int num, i;\r\n   \r\n  printf(\"Enter a number: \");\r\n  scanf(\"%d\", &amp;num);\r\n\r\n  for(i=1; i&lt;=10; ++i) {\r\n     printf(\"%d * %d = %d \\n\", num, i, num*i); \r\n  }\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Enter a number:<\/strong> 5<br \/>\n5 * 1 = 5<br \/>\n5 * 2 = 10<br \/>\n5 * 3 = 15<br \/>\n5 * 4 = 20<br \/>\n5 * 5 = 25<br \/>\n5 * 6 = 30<br \/>\n5 * 7 = 35<br \/>\n5 * 8 = 40<br \/>\n5 * 9 = 45<br \/>\n5 * 10 = 50<\/p>\n<h4>Example 7 &#8211; Factorial Program:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\/\/ Program to find factorial of a number\r\n\r\n#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  int num, i;\r\n  unsigned long long fact = 1;\r\n\r\n  printf(\"Enter a number: \");\r\n  scanf(\"%d\", &amp;num);\r\n\r\n  for(i=1; i&lt;=num; i++) {\r\n    fact = fact * i;\r\n  }\r\n\r\n  printf(\"Factorial of %d = %llu\", num, fact);  \r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Enter a number:<\/strong> 5<br \/>\nFactorial of 5 = 120<\/p>\n<h3>Avoiding Common Mistakes<\/h3>\n<p><strong>Watch out for errors like:<\/strong><\/p>\n<ul>\n<li>Mismatched bracket pairs lead to incorrect nesting<\/li>\n<li>Infinite loops if dependencies between loops are not handled properly<\/li>\n<li>Faulty logic from overlooking the nested loop flow<\/li>\n<\/ul>\n<h3>Tips for Efficient-Nested Loops<\/h3>\n<p><strong>Some best practices include:<\/strong><\/p>\n<ul>\n<li>Proper indentation to visualize loop hierarchy<\/li>\n<li>Meaningful variable names for loops<\/li>\n<li>Printing values during execution to debug tricky cases<\/li>\n<li>Modularizing nested logic into functions where possible<\/li>\n<\/ul>\n<h3>Conclusion<\/h3>\n<p>Nested for loops allows us to add complexity to our iterative C programs. We can combine multiple layers of looping to efficiently solve certain categories of problems. The examples illustrate their utility for repetitive tasks involving multi-dimensional data. With some practice, nested loops can become a valuable addition to any C coder&#8217;s toolkit.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Loops allow us to repeatedly execute code in an efficient manner. They form an integral part of programming across languages. In C, we have tools like the humble for loop to perform repetitive tasks.&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":120576,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[28383,23914,28337,28382],"class_list":["post-120574","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-nested-for-loop","tag-c-programming","tag-loop-in-c","tag-nested-for-loop-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Nested For Loop in C with Examples - DataFlair<\/title>\n<meta name=\"description\" content=\"A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop.\" \/>\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\/nested-for-loop-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Nested For Loop in C with Examples - DataFlair\" \/>\n<meta property=\"og:description\" content=\"A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/nested-for-loop-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-01-03T12:30:37+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-01-03T12:56:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.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=\"DataFlair 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=\"DataFlair 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":"Nested For Loop in C with Examples - DataFlair","description":"A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop.","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\/nested-for-loop-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Nested For Loop in C with Examples - DataFlair","og_description":"A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop.","og_url":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-01-03T12:30:37+00:00","article_modified_time":"2024-01-03T12:56:25+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.webp","type":"image\/webp"}],"author":"DataFlair Team","twitter_card":"summary_large_image","twitter_creator":"@DataFlairWS","twitter_site":"@DataFlairWS","twitter_misc":{"Written by":"DataFlair Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Nested For Loop in C with Examples","datePublished":"2024-01-03T12:30:37+00:00","dateModified":"2024-01-03T12:56:25+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/"},"wordCount":733,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.webp","keywords":["c nested for loop","c programming","loop in c","nested for loop in c"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/","url":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/","name":"Nested For Loop in C with Examples - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.webp","datePublished":"2024-01-03T12:30:37+00:00","dateModified":"2024-01-03T12:56:25+00:00","description":"A nested for loop is a loop nested inside another for loop. The inner loop runs in its entirety during each iteration of the outer loop.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/nested-for-loop-in-c.webp","width":1200,"height":628,"caption":"nested for loop in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/nested-for-loop-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":"Nested For Loop in C with Examples"}]},{"@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\/c187795dc82ab948373cca526df7c445","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/2302ebc438084d2f1f993edc1996a0aae01332e81f3227cba8df0c48ec010ca4?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team provides high-impact content on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. We make complex concepts easy to grasp, helping learners of all levels succeed in their tech careers.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam6\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120574","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\/581"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=120574"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120574\/revisions"}],"predecessor-version":[{"id":132848,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120574\/revisions\/132848"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120576"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120574"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120574"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120574"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}