

{"id":120374,"date":"2023-10-13T19:00:28","date_gmt":"2023-10-13T13:30:28","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=120374"},"modified":"2023-10-13T19:30:06","modified_gmt":"2023-10-13T14:00:06","slug":"left-shift-and-right-shift-operators-in-c","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/","title":{"rendered":"Left Shift and Right Shift Operators in C"},"content":{"rendered":"<p>Bitwise operations play a crucial role in low-level programming by enabling the manipulation of individual bits within binary data. Among these operations, the left shift and right shift operators are fundamental tools with a wide range of applications for binary data manipulation.<\/p>\n<p>In the realm of C programming, we will delve into these operators to understand their mechanics, explore their practical applications, and grasp their significance in real-world scenarios.<\/p>\n<h2>Understanding Bitwise Not Operator<\/h2>\n<p>The left shift operator and right shift operator for bitwise shifts in C are denoted by &#8220;&#8221; and &#8220;&gt;&gt;,&#8221; respectively. These operators allow us to change the value of a number based on the altered places by shifting the bits of a number to the left or to the right.<\/p>\n<h3>Left Shift Operator (&lt;&lt;)<\/h3>\n<p>The value to be shifted and how many positions to be added to it are the two operands for the left shift operator (). By the predetermined number of locations, it shifts the bits to the left while packing zeros into the empty spaces on the right. <strong>Here is an illustration:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int a = 5;  \/\/ Binary: 0101\r\n    int result = a &lt;&lt; 2;  \/\/ Binary result: 010100 (20 in decimal)\r\n    printf(\"Result of a &lt;&lt; 2: %d\\n\", result);  \/\/ Output: 20\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift-operator-in-c-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120680 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift-operator-in-c-output.webp\" alt=\"left shift operator in c output\" width=\"378\" height=\"142\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\n\r\nint main() {\r\n    \/\/ Declare a local variable\r\n    unsigned int value = 15; \/\/ Decimal value\r\n    \/\/ Use the left shift operator to shift the bits\r\n    value = value &lt;&lt; 2; \/\/ Left shifting by 2 positions\r\n    printf(\"After left shifting by 2 positions, the updated value is: %u\\n\", value);\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>After left shifting by 2 positions, the updated value is<\/strong>\u00a060<br \/>\n<strong>Time Complexity:<\/strong> O(1)<br \/>\n<strong>Space Complexity:<\/strong> O(1)<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120681 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/left-shift.webp\" alt=\"left shift\" width=\"600\" height=\"400\" \/><\/a><\/p>\n<h3>How Left Shift Operator Works in C?<\/h3>\n<p>Two integral operands are subjected to a bitwise operation by the left shift () operator in the C language. The second operand specifies a number of locations in which the operator should shift the bits of the first operand to the left. Zeros are inserted into the empty spaces left by the shift on the right side. The sign bit and the bits that are relocated past the end are discarded.<\/p>\n<p><strong>Key points to understand:<\/strong><\/p>\n<ul>\n<li><strong>Operand Types:<\/strong> Both operands of the left shift operator should be of integral types, typically integers.<\/li>\n<li><strong>Shifting Procedure:<\/strong> The binary form of the initial operand is moved towards the left by the quantity of positions indicated by the second operand.<\/li>\n<li><strong>Zero Fill:<\/strong> The newly created positions on the right (least significant side) are filled with zeroes.<\/li>\n<li><strong>Discarding Shifted Bits:<\/strong> Bits shifted beyond the left end are discarded, including the sign bit.<\/li>\n<\/ul>\n<p><strong>Undefined behavior arises in the following cases:<\/strong><\/p>\n<ul>\n<li>If the first operand is negative, the outcome is undefined.<\/li>\n<li>If the second operand is negative or greater than or equal to the number of bits in the first operand, the outcome is undefined.<\/li>\n<li>If the second operand is greater than the size of the integer type, the result is undefined.<\/li>\n<\/ul>\n<p>Let&#8217;s consider the decimal number 12, which has a binary representation of 1100. If we apply the left shift operator by 2 positions, denoted as 12 &lt;&lt; 2,<strong> the following steps occur:<\/strong><\/p>\n<ul>\n<li>The binary value 1100 (decimal 12) is taken.<\/li>\n<li>Each bit is shifted to two positions to the left.<\/li>\n<li>The result is 110000, which is 48 in decimal.<\/li>\n<\/ul>\n<p>So, 12 &lt;&lt; 2 results in 48. This can be explained as shifting the number 12 to the left by two positions, effectively multiplying it by 2^2 or 4, which gives 48.<\/p>\n<h3>Right Shift Operator (&gt;&gt;)<\/h3>\n<p>Similar to the left shift, the right shift operator (&gt;&gt;) shifts the bits to the right. The value to be shifted and the number of positions to shift it by are also required as operands. <strong>Here&#8217;s an illustration:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int a = 20;  \/\/ Binary: 10100\r\n    int result = a &gt;&gt; 2;  \/\/ Binary result: 00101 (5 in decimal)\r\n    printf(\"Result of a &gt;&gt; 2: %d\\n\", result);  \/\/ Output: 5\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-operator-in-c-output.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120682 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-operator-in-c-output.webp\" alt=\"right shift operator in c output\" width=\"348\" height=\"140\" \/><\/a><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    \/\/ Declare a local variable\r\n    unsigned int value = 0x3E; \/\/ Hexadecimal equivalent of 62 in decimal\r\n     value = value &gt;&gt; 3; \/\/ Right shifting by 3 positions\r\n    \/\/ Print the new value of the variable\r\n    printf(\"The new value = %u\\n\", value);\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>After right shifting by 3 positions, the updated value is<\/strong>\u00a07<br \/>\n<strong>Time Complexity:<\/strong> O(1)<br \/>\n<strong>Space Complexity:<\/strong> O(1)<\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter wp-image-120683 size-full\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift.webp\" alt=\"right shift\" width=\"600\" height=\"400\" \/><\/a><\/p>\n<h3>How Right Shift Operator Works in C?<\/h3>\n<p>In C, the right shift (&gt;&gt;) operator is a bitwise operation that enables the right-bit shifting of integral data types. It uses two operands, the value to be shifted (left operand) and the number of positions to shift by (right operand), much like the left shift operator. The left operand&#8217;s binary representation shifts the specified number of positions to the right during this operation, essentially dividing the value by 2, raised to the power of the shift count.<\/p>\n<p><strong>Example:<\/strong><\/p>\n<p>Consider the decimal number 48, which in binary is 110000. If we apply the right shift operator by 2 positions, denoted as 48 &gt;&gt; 2,<\/p>\n<p><strong>the following steps occur:<\/strong><\/p>\n<ul>\n<li>The binary value 110000 (decimal 48) is taken.<\/li>\n<li>Each bit is shifted to two positions to the right.<\/li>\n<li>The result is 001100, which is 12 in decimal.<\/li>\n<\/ul>\n<p>So, 48 &gt;&gt; 2 results in 12. This can be understood as shifting the number 48 to the right by two positions, effectively dividing it by 2^2 or 4, which gives 12.<\/p>\n<p>It&#8217;s important to note that while the right shift operator is useful for bit manipulation and division by powers of 2, <strong>there are scenarios where its behavior becomes undefined:<\/strong><\/p>\n<ul>\n<li>If the value of the first operand is negative, the result of the right shift operation is undefined.<\/li>\n<li>Similarly, if the value of the second operand is negative or if it&#8217;s greater than or equal to the number of bits in the first operand, the result is undefined.<\/li>\n<\/ul>\n<h3>Important Points<\/h3>\n<p>Caution should be exercised when employing left-shift and right-shift operators with negative numbers. If either of the operands is negative, the outcome becomes unpredictable. For instance, both -2 &gt;&gt; 1 and -2 &lt;&lt; 1 yield undefined behavior.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int negativeNumber = -2;\r\n    int resultLeft = negativeNumber &lt;&lt; 1; \/\/ Undefined behavior\r\n    int resultRight = negativeNumber &gt;&gt; 1; \/\/ Undefined behavior    \r\n    printf(\"Left Shift: %d\\n\", resultLeft);\r\n    printf(\"Right Shift: %d\\n\", resultRight);\r\n    \r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Left Shift:<\/strong> -4<br \/>\n<strong>Right Shift:<\/strong> -1<\/p>\n<p>When shifting a number by an amount exceeding the bit size of the integer, the results enter into uncertain territory. For instance, attempting 5 &lt;&lt; 40 without considering the 32-bit limitation could lead to undefined outcomes. To handle such cases with larger values, like 10ULL &lt;&lt; 60, the suffix ULL signifies Unsigned Long Long, utilizing its 64-bit capacity to accommodate substantial values.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int number = 5;\r\n    int result = number &lt;&lt; 40; \/\/ Undefined behavior for 32-bit integers\r\n    printf(\"Shift Result: %d\\n\", result);\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Shift Result:<\/strong> 0<\/p>\n<p>Left-shifting a number by 1 and right-shifting it by 1 is akin to multiplying the original value by 2 raised to the given exponent (e.g., 3 &lt;&lt; 2 equals 3 * 2^2) and dividing the initial value by the second value raised to the power of 2 (e.g., 8 &gt;&gt; 2 equals 8 \/ 2^2), respectively.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">#include &lt;stdio.h&gt;\r\nint main() {\r\n    int value = 3;\r\n    int leftShiftResult = value &lt;&lt; 2; \/\/ Equivalent to 3 * 2^2\r\n    int rightShiftResult = value &gt;&gt; 2; \/\/ Equivalent to 3 \/ 2^2\r\n    printf(\"Left Shift Result: %d\\n\", leftShiftResult);\r\n    printf(\"Right Shift Result: %d\\n\", rightShiftResult);\r\n    return 0;\r\n}<\/pre>\n<p><strong>Output:<\/strong><\/p>\n<p><strong>Left Shift Result:<\/strong> 12<br \/>\n<strong>Right Shift Result:<\/strong> 0<\/p>\n<h3>Logical vs. Arithmetic Shift<\/h3>\n<p>The difference between logical right shift and arithmetic right shift must be understood. During an arithmetic right shift, the sign bit (located at the leftmost side) is copied to ensure the number&#8217;s sign remains unchanged. On the other hand, in a logical right shift, the vacant bit slots are filled with zeros. The majority of C compilers employ arithmetic right shift.<\/p>\n<h3>Applications of Shift Operators<\/h3>\n<p><strong>Shift operators find numerous applications in programming:<\/strong><\/p>\n<ul>\n<li><strong>Bit Manipulation:<\/strong> Shifting is used to isolate and modify specific bits within a number.<\/li>\n<li><strong>Optimization:<\/strong> Shifting by powers of 2 is more efficient than multiplication or division.<\/li>\n<li><strong>Encoding and Decoding:<\/strong> Used in protocols like UTF-8 for efficient data representation.<\/li>\n<\/ul>\n<h3>Considerations and Pitfalls<\/h3>\n<p>Be cautious with shifting beyond the data type&#8217;s width or by a negative amount, as it results in undefined behavior. Additionally, make sure to use the appropriate shift operator based on your requirements.<\/p>\n<h3>Performance and Efficiency<\/h3>\n<p>Shift operations are generally faster and more efficient than traditional multiplication or division, especially when working with powers of 2. Modern compilers often optimize these operations.<\/p>\n<h3>Conclusion<\/h3>\n<p>Learning the left shift and right shift operators will give you the ability to execute complex bit manipulations and optimize your code as you enter the world of low-level programming. Despite having a straightforward notion, these operators are crucial for performing complex programming tasks. You can expand the efficiency and accuracy of your C programming by utilizing their skills.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Bitwise operations play a crucial role in low-level programming by enabling the manipulation of individual bits within binary data. Among these operations, the left shift and right shift operators are fundamental tools with a&#46;&#46;&#46;<\/p>\n","protected":false},"author":581,"featured_media":120377,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[19488],"tags":[28318,28272,28317,28316,28319,28320],"class_list":["post-120374","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-c-programming","tag-bitwise-operator","tag-bitwise-operator-in-c","tag-left-shift-and-right-shift-operators","tag-left-shift-and-right-shift-operators-in-c","tag-left-shift-operator-in-c","tag-right-shift-operator-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.8 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Left Shift and Right Shift Operators in C - DataFlair<\/title>\n<meta name=\"description\" content=\"Left shift and right shift operators in C will give you the ability to execute complex bit manipulations and optimize your 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\/left-shift-and-right-shift-operators-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Left Shift and Right Shift Operators in C - DataFlair\" \/>\n<meta property=\"og:description\" content=\"Left shift and right shift operators in C will give you the ability to execute complex bit manipulations and optimize your code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-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-10-13T13:30:28+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-10-13T14:00:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-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":"Left Shift and Right Shift Operators in C - DataFlair","description":"Left shift and right shift operators in C will give you the ability to execute complex bit manipulations and optimize your 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\/left-shift-and-right-shift-operators-in-c\/","og_locale":"en_US","og_type":"article","og_title":"Left Shift and Right Shift Operators in C - DataFlair","og_description":"Left shift and right shift operators in C will give you the ability to execute complex bit manipulations and optimize your code.","og_url":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2023-10-13T13:30:28+00:00","article_modified_time":"2023-10-13T14:00:06+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-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\/left-shift-and-right-shift-operators-in-c\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/c187795dc82ab948373cca526df7c445"},"headline":"Left Shift and Right Shift Operators in C","datePublished":"2023-10-13T13:30:28+00:00","dateModified":"2023-10-13T14:00:06+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/"},"wordCount":1195,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-in-c.webp","keywords":["bitwise operator","bitwise operator in c","left shift and right shift operators","left shift and right shift operators in c","left shift operator in c","right shift operator in c"],"articleSection":["C Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/","url":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/","name":"Left Shift and Right Shift Operators in C - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-in-c.webp","datePublished":"2023-10-13T13:30:28+00:00","dateModified":"2023-10-13T14:00:06+00:00","description":"Left shift and right shift operators in C will give you the ability to execute complex bit manipulations and optimize your code.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-in-c\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-in-c.webp","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2023\/09\/right-shift-and-left-shift-operators-in-c.webp","width":1200,"height":628,"caption":"right shift and left shift operators in c"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/left-shift-and-right-shift-operators-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":"Left Shift and Right Shift Operators 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\/120374","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=120374"}],"version-history":[{"count":6,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120374\/revisions"}],"predecessor-version":[{"id":122765,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/120374\/revisions\/122765"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/120377"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=120374"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=120374"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=120374"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}