

{"id":120338,"date":"2023-11-18T18:00:48","date_gmt":"2023-11-18T12:30:48","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120338"},"modified":"2023-11-18T18:11:33","modified_gmt":"2023-11-18T12:41:33","slug":"do-while-loop-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/","title":{"rendered":"Do While Loop in C"},"content":{"rendered":"<p>Loops are an indispensable tool in programming, enabling us to repeatedly execute blocks of code for iterative tasks.<\/p>\n<p>In C, we have several loop constructs at our disposal, including the versatile do-while loop. Unlike the for and while loops, the do-while loop ensures the loop body is executed at least once before checking the loop condition. This unique structure makes do-while loops ideal for situations that require one guaranteed run of the loop before potentially breaking out of the iteration.<\/p>\n<h2>Understanding the Do While Loop in C<\/h2>\n<p>The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.<\/p>\n<p><strong>Its syntax follows:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">do {\r\n\/\/ code block\r\n} while (condition);<\/pre>\n<p>Notice that the loop condition is evaluated after the loop body, unlike the while loop. This means the code block will run at least once regardless of the condition&#8217;s value. The condition is still critical since it determines if the looping continues beyond the initial execution.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c-1.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120785 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c-1.webp\" alt=\"do while loop in c\" width=\"600\" height=\"338\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  int count = 1;\r\n\r\n  do {\r\n    printf(\"Dataflair\\n\");\r\n    count++;\r\n  } while(count &lt;= 4);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>Dataflair<br \/>\nDataflair<br \/>\nDataflair<br \/>\nDataflair<\/p>\n<h3>How the C Do While Loop Works?<\/h3>\n<p>We can visualize the operation of a do-while loop in C by thinking of it as a rollercoaster ride. You get strapped into your seat on the rollercoaster (the initial unavoidable execution), and only after completing the ride do you get to decide if you want to go again based on whether you met your thrill quota (the loop condition). If you&#8217;re still thirsty for adrenaline, you strap yourself in for another round. You keep reading until you&#8217;ve had your fill of excitement.<\/p>\n<p><strong>The do-while loop follows a similar predefined sequence:<\/strong><\/p>\n<ul>\n<li>Initialize variables needed in the loop<\/li>\n<li>Execute the loop body (ride the rollercoaster)<\/li>\n<li>Evaluate the loop condition to decide whether to repeat the body<\/li>\n<li>If the condition is true, go back to step 2. Otherwise, exit the loop.<\/li>\n<li>Optionally update variables for the next iteration at the end of the loop body.<\/li>\n<\/ul>\n<h3>Do While Loop Structure in C<\/h3>\n<p><strong>Let&#8217;s explore the anatomy of a do-while loop in more detail:<\/strong><\/p>\n<ul>\n<li><strong>Initialization:<\/strong> Before entering the loop, variables used in the code and condition need initialization.<\/li>\n<li><strong>Body Execution:<\/strong> This first and mandatory execution of the loop body is what sets the do-while loop apart. The program always runs the code inside the loop once before checking the condition.<\/li>\n<li><strong>Condition Evaluation:<\/strong> After completing the loop body, the condition is evaluated. If it is true, the flow jumps back to execute the loop body again.<\/li>\n<li><strong>Updation:<\/strong> An update expression can be added at the end of the loop body to prepare variables for the next iteration.<\/li>\n<\/ul>\n<h3>Properties of the C Do While Loop<\/h3>\n<ul>\n<li>The loop condition is compulsory and must eventually be evaluated to false to avoid infinite looping.<\/li>\n<li>The body can be empty, but that would result in an infinite loop if no condition exists.<\/li>\n<li>Multiple conditions can be checked using logical operators before determining whether to repeat the loop execution.<\/li>\n<\/ul>\n<h3>Common Use Cases<\/h3>\n<h4>Menu-Driven Programs<\/h4>\n<p>Do-while loops shine in interactive, menu-driven programs that require displaying a menu, accepting user input, processing the input, and repeating continuously. The menu choices are always shown at least once before checking if the user wants to quit.<\/p>\n<h4>Input Validation<\/h4>\n<p>When accepting input like age, we can use a do-while loop to validate if the input is sensible before using it programmatically. The validation code executes at least once, preventing progression until the input has been verified.<\/p>\n<h4>Data Processing<\/h4>\n<p>In applications like data logging that need to run until a specific event occurs, a do-while loop runs continuously until the terminating condition is met. The data is processed in each iteration until logging should stop.<\/p>\n<h3>Best Practices<\/h3>\n<ul>\n<li>Include a loop counter or progress indicator so the user knows the application is not frozen.<\/li>\n<li>Use descriptive conditional variables like validInput to make the purpose clear.<\/li>\n<li>Indent the loop body neatly and include comments where helpful.<\/li>\n<\/ul>\n<h3>Example Code Walkthrough<\/h3>\n<p><strong>Let&#8217;s look at some do-while loop examples to demonstrate their usage.<\/strong><\/p>\n<h4>Counting Down<\/h4>\n<ul>\n<li>Initializes count to 5 to set up the starting point for the countdown.<\/li>\n<li>The do-while loop prints count first before checking the condition. This ensures that 5 is printed even though the condition fails on the first iteration.<\/li>\n<li>The count is decremented by 1 each iteration with count&#8211;. This progresses the countdown.<\/li>\n<li>The condition check count &gt; 0 stops the loop once the count hits 0.<\/li>\n<li>do-while is ideal since we want the print-decrement steps to execute at least once before checking the condition.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int count = 5;\r\ndo {\r\n  printf(\"%d\\n\", count);\r\n  count--; \r\n} while (count &gt; 0);<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>5<br \/>\n4<br \/>\n3<br \/>\n2<br \/>\n1<\/p>\n<h4>Factorial Calculation<\/h4>\n<ul>\n<li>num starts at 5 since we want to calculate a factorial of 5. factorial is initialized to 1.<\/li>\n<li>The do-while loop first multiplies factorial by num, then decrements num by 1.<\/li>\n<li>This computes the factorial by successive multiplication as num counts down to 1.<\/li>\n<li>When num reaches 1, the condition fails, and the loop stops.<\/li>\n<li>Do-while ensures the multiplication happens once before checking against 1.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int num = 5, factorial = 1;\r\n\r\ndo {\r\n  factorial *= num;\r\n  num--;\r\n} while (num &gt; 1);\r\n\r\nprintf(\"Factorial of 5 is %d\", factorial);<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p>A factorial of 5 is 120<\/p>\n<h4>Menu-Driven Program<\/h4>\n<ul>\n<li>The loop displays the menu options and retrieves user input.<\/li>\n<li>It validates the choice is between 1 and 3, but it prints an error.<\/li>\n<li>If the choice is 3, the break statement exits the loop.<\/li>\n<li>For other valid choices, it prints a message and loops back.<\/li>\n<li>The while(1) condition keeps looping indefinitely until a break occurs.<\/li>\n<li>Do-while allows validating input before the condition check.<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int choice;\r\n\r\ndo {\r\n  printf(\"Menu \\n\");\r\n  printf(\"1. Option 1\\n\");\r\n  printf(\"2. Option 2\\n\"); \r\n  printf(\"3. Quit\\n\");\r\n\r\n  printf(\"Enter your choice: \");\r\n  scanf(\"%d\", &amp;choice);\r\n  \r\n  if(choice &gt;=1 &amp;&amp; choice &lt;= 3) {\r\n    if(choice == 3) \r\n      break; \r\n    else \r\n      printf(\"Perform option %d tasks\\n\", choice); \r\n  }\r\n  else {\r\n    printf(\"Invalid choice. Try again.\\n\");\r\n  }\r\n} while(1);\r\n\r\nprintf(\"Exiting program...\");<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Menu<br \/>\n<\/strong>1. Option 1<br \/>\n2. Option 2<br \/>\n3. Quit<\/p>\n<p><strong>Enter your choice:<\/strong> 4<br \/>\nInvalid choice. Try again.<\/p>\n<p><strong>Menu<\/strong><br \/>\n1. Option 1<br \/>\n2. Option 2<br \/>\n3. Quit<\/p>\n<p><strong>Enter your choice:<\/strong> 2<br \/>\nPerform option 2 tasks<\/p>\n<p><strong>Menu<\/strong><br \/>\n1. Option 1<br \/>\n2. Option 2<br \/>\n3. Quit<\/p>\n<p><strong>Enter your choice:<\/strong> 3<br \/>\nExiting program&#8230;<\/p>\n<p>This showcases how a do-while loop can create a reusable menu with input validation.<\/p>\n<h3>Nested Do-While Loops in C<\/h3>\n<p>Like other loop statements in C, do-while loops can also be nested to create complex iterative logic. A nested do-while places one do-while loop within the body of another do-while loop.<\/p>\n<p>The inner loop executes to completion for every single iteration of the outer loop. This allows you to add layers of processing logic.<\/p>\n<p><strong>Let&#8217;s look at examples to understand this better.<\/strong><\/p>\n<h4>Printing a Pattern<\/h4>\n<p>Every time the outer loop iterates in this nested loop, a pattern of increasing size is printed.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int rows = 5;\r\nint i = 1;\r\n\r\ndo {\r\n  int j = 1; \r\n  do {\r\n    printf(\"*\");\r\n    j++; \r\n  } while(j &lt;= i);\r\n  \r\n  printf(\"\\n\");\r\n  i++;\r\n\r\n} while(i &lt;= rows);<\/pre>\n<p>Output:<\/p>\n<p>*<br \/>\n**<br \/>\n***<br \/>\n****<br \/>\n*****<\/p>\n<p>The inner loop handles printing the stars and increments j. The outer loop increments i to control the number of rows.<\/p>\n<h3>Debugging and Common Mistakes<\/h3>\n<p>Like any loop, do-while loops can cause headaches if not structured properly. <strong>Follow these debugging tips:<\/strong><\/p>\n<ul>\n<li>Add print statements to check variable values in each iteration.<\/li>\n<li>Use a debugger tool to step through the loop execution.<\/li>\n<li>Check for endless loops caused by a faulty condition that never becomes false.<\/li>\n<li>Ensure the variables used in the condition get updated within the loop body.<\/li>\n<\/ul>\n<h3>Difference between while and Do while Loop in C<\/h3>\n<table>\n<tbody>\n<tr>\n<td><span style=\"font-weight: 400\">Feature<\/span><\/td>\n<td><span style=\"font-weight: 400\">while loop<\/span><\/td>\n<td><span style=\"font-weight: 400\">do&#8230;while loop<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">The test condition is checked<\/span><\/td>\n<td><span style=\"font-weight: 400\">Before the loop body is executed<\/span><\/td>\n<td><span style=\"font-weight: 400\">After the loop body is executed<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Execution of loop body<\/span><\/td>\n<td><span style=\"font-weight: 400\">Not executed if the condition is false<\/span><\/td>\n<td><span style=\"font-weight: 400\">Executed at least once, even if the condition is false<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Type of loop<\/span><\/td>\n<td><span style=\"font-weight: 400\">Pre-tested or entry-controlled loop<\/span><\/td>\n<td><span style=\"font-weight: 400\">Post-tested or exit-controlled loop<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Semicolon<\/span><\/td>\n<td><span style=\"font-weight: 400\">Not required<\/span><\/td>\n<td><span style=\"font-weight: 400\">Required at the end<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Conclusion<\/h3>\n<p>The C do-while loop is a versatile tool for writing conditional loops requiring one assured pass before potentially breaking out of the iteration. Its unique structure opens up possibilities for creating menu-driven programs, validating input, and other use cases benefiting from an initial loop execution. By learning how and when to leverage the do-while loop, you expand your ability to craft efficient C programs.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Loops are an indispensable tool in programming, enabling us to repeatedly execute blocks of code for iterative tasks. In C, we have several loop constructs at our disposal, including the versatile do-while loop. Unlike&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":120340,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[28377,23914,28585,19210,20291],"class_list":["post-120338","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-do-while-loop","tag-c-programming","tag-c-tutorial","tag-do-while-loop","tag-do-while-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>Do While Loop in C - DataFlair<\/title>\n<meta name=\"description\" content=\"The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.\" \/>\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\/do-while-loop-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Do While Loop in C - DataFlair\" \/>\n<meta property=\"og:description\" content=\"The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/do-while-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=\"2023-11-18T12:30:48+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-11-18T12:41:33+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Do While Loop in C - DataFlair","description":"The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.","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\/do-while-loop-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Do While Loop in C - DataFlair","og_description":"The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.","og_url":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-11-18T12:30:48+00:00","article_modified_time":"2023-11-18T12:41:33+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Do While Loop in C","datePublished":"2023-11-18T12:30:48+00:00","dateModified":"2023-11-18T12:41:33+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/"},"wordCount":1228,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c.webp","keywords":["c do while loop","c programming","c tutorial","Do while Loop","Do while loop in C"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/","url":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/","name":"Do While Loop in C - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c.webp","datePublished":"2023-11-18T12:30:48+00:00","dateModified":"2023-11-18T12:41:33+00:00","description":"The do-while loop in C executes a code block once initially and then repeats the loop body continuously while a condition remains true.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/do-while-loop-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/do-while-loop-in-c.webp","width":1200,"height":628,"caption":"do while loop in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/do-while-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":"Do While Loop 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\/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\/120338","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=120338"}],"version-history":[{"count":7,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120338\/revisions"}],"predecessor-version":[{"id":126557,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120338\/revisions\/126557"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120340"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120338"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120338"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120338"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}