

{"id":120866,"date":"2024-03-28T18:00:07","date_gmt":"2024-03-28T12:30:07","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120866"},"modified":"2024-03-28T19:03:11","modified_gmt":"2024-03-28T13:33:11","slug":"c-program-to-find-length-of-string","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/","title":{"rendered":"C Program to Find Length of String"},"content":{"rendered":"<p>Determining the length of a string is a common task in programming. It allows us to perform operations on strings of text in an abstract way without needing to know the exact contents.<\/p>\n<p>Strings are represented as arrays of characters in C programming, and they are terminated by the null character &#8220;\/0&#8221;. To find the length of a C string, we need to iterate through the characters until we encounter the null terminator.<\/p>\n<p>In this article, we will learn how to write a C program that can find and print the length of a string input by the user. Being able to manipulate strings is a fundamental skill in C that allows programmers to write code that can handle text input and output.<\/p>\n<h2>Understanding Strings in C<\/h2>\n<p>A string in C is simply an array of char data types. The difference between a regular array and a string is that strings are terminated with a special null character &#8216;\\0&#8217;. This null character signals the end of the string.<\/p>\n<p><strong>For example:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">char str[6] = {'H', 'e', 'l', 'l', 'o', '\\0'};<\/pre>\n<p>Here, str is a char array that can hold six characters. The last element is &#8216;\\0&#8217;, which marks the end of the string.<\/p>\n<p>Note that in C, strings are always one element longer than the actual string length to accommodate the null terminator.<\/p>\n<h3>Algorithm to Find String Length in C<\/h3>\n<p><strong>Here is a step-by-step algorithm to find the length of a string in C:<\/strong><\/p>\n<p>1. Start with an index variable at 0 to track the current position in the string.<br \/>\n2. Verify that the character at the present index is &#8216;\/0\u2019.<br \/>\n3. If it is, we have reached the end of the string. Return the index as the string length.<br \/>\n4. If not, increment the index and repeat steps 2 onwards.<\/p>\n<h4>In pseudocode:<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Initialize index = 0 \r\n\r\nWhile str[index] is not equal to '\\0'\r\n   Increment index\r\n   \r\nReturn index<\/pre>\n<p>This traverses the string until it hits the null character, counting the index value along the way.<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Algorithm-to-Find-String-Length.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-130435 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/11\/Algorithm-to-Find-String-Length.webp\" alt=\"Algorithm to Find String Length\" width=\"400\" height=\"210\" \/><\/a><\/p>\n<h3>Methods To Find String Length in C<\/h3>\n<p>There are several different ways to find the length of a string in C programming. <strong>Here are 4 common methods:<\/strong><\/p>\n<h4>1) Using a Loop<\/h4>\n<p>One way is to use a for loop to iterate through each character of the string, incrementing a counter variable for each character. The loop continues until it reaches the null terminator &#8216;\\0&#8217; at the end of the string. The final count gives the length. This manual counting approach works for both arrays and pointers.<\/p>\n<h4>2) Using strlen()<\/h4>\n<p>The strlen() function is a standard C library function that returns the length of the string passed to it. It loops through the string in the background and returns the number of characters before the terminating null byte. This provides a simple way to get the length.<\/p>\n<h4>3) Using sizeof()<\/h4>\n<p>The sizeof operator returns the total allocated size in bytes of an array or pointer variable. For strings, we can use sizeof(string) &#8211; 1 to get the length, as the null terminator byte is included in the size returned by sizeof().<\/p>\n<h4>4) Using Pointer Difference<\/h4>\n<p>We can use pointers to manually iterate through the string and find the length. This involves initializing two pointers to the start of the string, incrementing the second pointer until it reaches null, and then finding the difference between the two pointers. This gives the number of characters iterated, i.e. the string length.<\/p>\n<h3>Steps to Determine C String Length Using Various Methods<\/h3>\n<h4>Using a Loop<\/h4>\n<ul>\n<li>Initialize counter variable to 0<\/li>\n<li>Use for loop to traverse string characters<\/li>\n<li>Increment counter for each character<\/li>\n<li>Loop until null terminator &#8216;\\0&#8217; is reached<\/li>\n<li>Counter variable contains string length<\/li>\n<li>Counts characters manually by iterating through the string<\/li>\n<\/ul>\n<h4>Using strlen()<\/h4>\n<ul>\n<li>Declare char array or pointer to store string<\/li>\n<li>Call strlen(), pass string as argument<\/li>\n<li>It returns length of string (excluding null terminator)<\/li>\n<li>Library function handles iterating and counting internally<\/li>\n<\/ul>\n<h4>Using sizeof()<\/h4>\n<ul>\n<li>Declare char array to store entire string<\/li>\n<li>Apply sizeof() on array, which returns total bytes<\/li>\n<li>Subtract 1 to exclude the null terminator byte<\/li>\n<li>Returns allocated size of array in bytes, including null terminator<\/li>\n<\/ul>\n<h4>Using Pointer Arithmetic<\/h4>\n<ul>\n<li>Initialize pointer to start of string<\/li>\n<li>Increment second pointer until it reaches null<\/li>\n<li>Subtract pointers to get number of characters iterated<\/li>\n<li>Manual iteration by incrementing pointer and calculating difference<\/li>\n<\/ul>\n<h3>C Program Implementation<\/h3>\n<p><strong>Here are various ways to implement a C program to find the length of a string:<\/strong><\/p>\n<h4>1. Using a Loop<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  char str[100];\r\n  int i, len;\r\n\r\n  printf(\"Enter a string: \");\r\n  scanf(\"%s\", str);\r\n\r\n  \/\/ initialize i to start at 0\r\n  i = 0; \r\n  \r\n  \/\/ iterate until null character is reached\r\n  while(str[i] != '\\0') {\r\n    i++;\r\n  }\r\n\r\n  len = i;\r\n\r\n  printf(\"Length of string: %d\", len);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n<strong>Enter a string:<\/strong> Hi<br \/>\n<strong>Length of string:<\/strong> 2<\/p>\n<p>This program takes string input from the user using scanf. A while loop is used to iterate through the characters, incrementing variable i in each iteration until the null terminator is reached. The final value of i is assigned to len, which stores the string length.<\/p>\n<p><strong>Time Complexity:<\/strong> O(N)<br \/>\n<strong>Auxiliary Space:<\/strong> O(1)<\/p>\n<h4>2. Using strlen()<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n#include &lt;string.h&gt;\r\n\r\nint main() {\r\n\r\n  char str[100];\r\n\r\n  printf(\"Enter a string: \");\r\n  scanf(\"%s\", str);\r\n  \r\n  int len = strlen(str);\r\n\r\n  printf(\"Length of string: %d\", len);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n<strong>Enter a string:<\/strong> DataFlair<br \/>\n<strong>Length of string:<\/strong> 9<\/p>\n<p>strlen() automatically iterates through the string and returns the length, saving us from writing the manual iteration loop.<\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<br \/>\n<strong>Auxiliary Space:<\/strong> O(1)<\/p>\n<h4>3. Using sizeof()<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n\r\n  char str[100] = \"Hello\";\r\n  \r\n  int len = sizeof(str) \/ sizeof(str[0]);\r\n  \r\n  printf(\"Length: %d\", len);\r\n  \r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n<strong>Length of string:<\/strong> 5<\/p>\n<p>sizeof(str) returns the total array size, divided by single element size gives the length.<\/p>\n<p><strong>Time Complexity:<\/strong> O(1)<br \/>\n<strong>Auxiliary Space:<\/strong> O(1)<\/p>\n<h4>4. Using Pointer Subtraction<\/h4>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n  char *start, *end;\r\n  int len;\r\n\r\n  \/\/ Define the input string as \"coding\"\r\n  char input[] = \"coding\";\r\n  \r\n  \/\/ Initialize the start and end pointers\r\n  start = input;\r\n  end = input;\r\n\r\n  \/\/ Move the end pointer to the end of the string\r\n  while (*end != '\\0') {\r\n    end++;\r\n  }\r\n\r\n  \/\/ Calculate the length\r\n  len = end - start;\r\n\r\n  printf(\"Length: %d\", len);\r\n\r\n  return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><br \/>\n<strong>Length of string:<\/strong> 6<\/p>\n<p>By subtracting the starting and ending pointers, we get the string length.<\/p>\n<p><strong>Time Complexity:<\/strong> O(n)<br \/>\n<strong>Space Complexity:<\/strong> O(1)<\/p>\n<h3>Example Usage<\/h3>\n<p><strong>Here are some examples of how the program handles different string inputs:<\/strong><\/p>\n<h4>1. Input: Hello<\/h4>\n<p><strong>Output:<\/strong> Length of string: 5<\/p>\n<h4>2. Input: DataFlair<\/h4>\n<p><strong>Output:<\/strong> Length of string: 9<\/p>\n<h4>3. Input: Programming in C is fun!<\/h4>\n<p><strong>Output:<\/strong> Length of string: 23<\/p>\n<p>The program correctly prints the length for strings of different content and sizes.<\/p>\n<h4>Code Explanation<\/h4>\n<p><strong>Let&#8217;s go over the key aspects of each technique:<\/strong><\/p>\n<ul>\n<li>The manual loop increments an index variable until the null terminator is reached.<\/li>\n<li>strlen() handles the iteration internally and returns the length.<\/li>\n<li>sizeof() leverages the size of the entire array vs a single element.<\/li>\n<li>Pointer subtraction finds the difference between the starting and ending pointer locations.<\/li>\n<\/ul>\n<p>Choosing which method to use depends on the requirements and constraints of the program.<\/p>\n<h3>Common Pitfalls and Error Handling in C<\/h3>\n<p><strong>Some common mistakes when finding string length in C:<\/strong><\/p>\n<ul>\n<li>Forgetting to initialize variables properly<\/li>\n<li>Not allocating enough buffer size<\/li>\n<li>Improper null termination handling<\/li>\n<li>Buffer overflows from invalid user input<\/li>\n<\/ul>\n<p>To avoid bugs, be careful when incrementing i in the loop and check for null termination properly.<\/p>\n<p>Also, input validation can be added to sanitize user input and prevent buffer overflows from overly long strings.<\/p>\n<h3>Conclusion<\/h3>\n<p>This article covered different techniques like loops, strlen(), sizeof(), and pointer subtraction to find the length of a string in C. Calculating string lengths is an important skill that helps manipulate textual data. The methods here can be applied to solve more complex string problems.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Determining the length of a string is a common task in programming. It allows us to perform operations on strings of text in an abstract way without needing to know the exact contents. Strings&#46;&#46;&#46;<\/p>\n","protected":false},"author":86671,"featured_media":120868,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[29939,29937,29936,29133,29938],"class_list":["post-120866","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-c-find-length-of-string","tag-c-program-to-find-length-of-string","tag-c-programmig","tag-c-tutorials","tag-find-length-of-string-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C Program to Find Length of String - DataFlair<\/title>\n<meta name=\"description\" content=\"In this we will learn how to write a C program that can find and print the length of a string input by the user.\" \/>\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\/c-program-to-find-length-of-string\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C Program to Find Length of String - DataFlair\" \/>\n<meta property=\"og:description\" content=\"In this we will learn how to write a C program that can find and print the length of a string input by the user.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/\" \/>\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-03-28T12:30:07+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-03-28T13:33:11+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.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=\"6 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C Program to Find Length of String - DataFlair","description":"In this we will learn how to write a C program that can find and print the length of a string input by the user.","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\/c-program-to-find-length-of-string\/","og_locale":"en_US","og_type":"article","og_title":"C Program to Find Length of String - DataFlair","og_description":"In this we will learn how to write a C program that can find and print the length of a string input by the user.","og_url":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2024-03-28T12:30:07+00:00","article_modified_time":"2024-03-28T13:33:11+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.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":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/0e594f928e31fc96628ac40f6ae74f49"},"headline":"C Program to Find Length of String","datePublished":"2024-03-28T12:30:07+00:00","dateModified":"2024-03-28T13:33:11+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/"},"wordCount":1091,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.webp","keywords":["c find length of string","C Program to Find Length of String","c programmig","c tutorials","find length of string in c"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/","url":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/","name":"C Program to Find Length of String - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.webp","datePublished":"2024-03-28T12:30:07+00:00","dateModified":"2024-03-28T13:33:11+00:00","description":"In this we will learn how to write a C program that can find and print the length of a string input by the user.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/c-program-to-find-length-of-string.webp","width":1200,"height":628,"caption":"c program to find length of string"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/c-program-to-find-length-of-string\/#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":"C Program to Find Length of String"}]},{"@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\/120866","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=120866"}],"version-history":[{"count":5,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120866\/revisions"}],"predecessor-version":[{"id":131806,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120866\/revisions\/131806"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120868"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120866"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120866"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120866"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}