

{"id":61917,"date":"2019-07-04T12:46:31","date_gmt":"2019-07-04T07:16:31","guid":{"rendered":"https:\/\/data-flair.training\/blogs\/?p=61917"},"modified":"2021-10-06T19:12:06","modified_gmt":"2021-10-06T13:42:06","slug":"cpp-namespace","status":"publish","type":"post","link":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/","title":{"rendered":"Learn C++ Namespace with Syntax and Example in just 4 Mins!"},"content":{"rendered":"<p><em>Every C++ program contains namespace. If it is not used, an alternative is available which proves to be more complex than namespaces. It is a relatively new concept introduced by the latest C++ standards. It is evident that namespaces in C++ are of immense significance as it is an integral part of each and every C++ program.<\/em><\/p>\n<h3>C++ Namespace with Example<\/h3>\n<p>Let us consider the situation. There are 30 students in your classroom and out of 30 students, suppose there are 3 students with the same first name. If we simply use their first name to refer them, it is pretty obvious that some confusion would be created. To avoid this problem, we refer them by their unique feature, like their personal id.\u00a0Similarly, we use namespaces to uniquely identify different functions that go by the same name.<\/p>\n<p>For instance, the keyword <strong>\u201cclass\u201d<\/strong> connotes a different meaning when implemented as classes and objects and mean an entirely different thing when used while defining a template. This key difference is highlighted by namespaces.<\/p>\n<p>In programming terminology, namespaces act as a declarative region that provides scope to the identifiers used in the program such as functions and variables.<\/p>\n<p>We use namespaces to organize the code into a logical collection in order to prevent name collisions. These collisions may occur when our base code contains multiple libraries.<\/p>\n<h3>Syntax of C++ Namespace<\/h3>\n<p>The basic statement of using namespaces is:<\/p>\n<p><strong>using namespace std;<\/strong><\/p>\n<p>So far, we have seen the need to include namespaces in our program.<\/p>\n<p>But, the question arises-<em> Is there any alternative way of achieving the same purpose without the use of the namespace statement?<\/em><\/p>\n<p>Surprisingly, the answer is &#8211; yes!<\/p>\n<p>But this alternative method proves to be a bit complicated as compared to simply using namespaces in C++.<\/p>\n<p>This is how your code segment would look without the inclusion of namespaces:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">int x = 10; \r\nnamespace test\r\n{\r\nint x = 20;\r\nvoid function() \r\n{ \r\nstd::cout &lt;&lt; x &lt;&lt; std::endl; \/\/ Prints20\r\nstd::cout &lt;&lt; ::x &lt;&lt; std::endl; \/\/ Prints 10\r\n} \r\n}\r\n<\/pre>\n<p>Here, <strong>\u201c::\u201d<\/strong> refers to the global namespace.<\/p>\n<p><strong>Here is a C++ program that illustrates the use of namespaces in C++:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;iostream&gt; \r\nusing namespace std; \r\n\r\nnamespace data \r\n{ \r\nint val = 30; \r\n} \r\n\r\nint val = 10; \/\/ Global variable initialization\r\n\r\nint main() \r\n{\r\n\r\ncout&lt;&lt;\"Welcome to DataFlair tutorials!\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nint val = 20; \/\/ Local variable initialization\r\ncout &lt;&lt; data::val &lt;&lt; endl; \r\n\r\nreturn 0; \r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-62022\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp.jpg\" alt=\"Output of Namespaces in C++\" width=\"1303\" height=\"613\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp.jpg 1303w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-150x71.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-300x141.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-768x361.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-1024x482.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-520x245.jpg 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Namespaces-in-Cpp-720x340.jpg 720w\" sizes=\"auto, (max-width: 1303px) 100vw, 1303px\" \/><\/a><\/p>\n<h3>Rules for C++ Namespace<\/h3>\n<ol>\n<li>\u00a0It is mandatory to either provide a global scope for the namespace definition or nest it within another namespace.<\/li>\n<li>\u00a0Be sure not to terminate the namespace definition with a semicolon.<\/li>\n<li>C++ gives you the provision to choose an alias name for the namespace you want to create in order to simplify things for you. If you do not wish to provide any name to the namespace you\u2019re creating, you may leave it unnamed.<\/li>\n<li>C++ prohibits you to create an instance of the namespace.<\/li>\n<li>We can extend the namespace definition over multiple files without having to worry about the files being overridden or redefined.<\/li>\n<\/ol>\n<h3>C++ Discontiguous Namespace<\/h3>\n<p>C++ gives you the provision to define namespaces in various parts of the program that can be spread over multiple files. This is called as a discontiguous namespace. After all, the entire namespace is considered as the sum of its separately defined parts.<\/p>\n<h3>The \u201cusing\u201d Directive<\/h3>\n<p>The \u201cusing\u201d directive instructs the compiler that the subsequent code uses names in the specified namespace.<\/p>\n<p><strong>Here is a C++ program that illustrates the use of the \u201cusing\u201d directive:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;iostream&gt;\r\nusing namespace std;\r\n\r\nnamespace n1 \r\n{\r\nvoid function() \r\n{\r\ncout &lt;&lt; \"Namespace n1\" &lt;&lt; endl;\r\n}\r\n}\r\n\r\nnamespace n2 \r\n{\r\nvoid function() \r\n{\r\ncout &lt;&lt; \"Namespace n2\" &lt;&lt; endl;\r\n}\r\n}\r\n\r\nusing namespace n1;\r\nint main () \r\n{\r\n\r\ncout&lt;&lt;\"Welcome to DataFlair tutorials!\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nfunction();\r\n\r\nreturn 0;\r\n}<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-62064\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C.jpg\" alt=\"Using directives in C++\" width=\"997\" height=\"564\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C.jpg 997w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C-150x85.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C-300x170.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C-768x434.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Using-directives-in-C-520x294.jpg 520w\" sizes=\"auto, (max-width: 997px) 100vw, 997px\" \/><\/a><\/p>\n<p>We can use the<strong> \u2018using\u2019<\/strong> keyword to refer to a specific item within a namespace.<\/p>\n<p>For instance, if you want to use the <strong>\u201ccout\u201d<\/strong> function, you can use the <strong>std global<\/strong> namespace.<\/p>\n<p><strong>using std::cout;<\/strong><\/p>\n<h3>Nested Namespace in C++<\/h3>\n<p>Just like a nesting of functions, loops, classes, and<em><strong> structures <\/strong><\/em>exist<em><strong>,<\/strong> C++<\/em> gives us the provision to nest namespaces as well.<\/p>\n<p><strong>The basic syntax of nesting a namespace n2 in n1 is as follows:<\/strong><\/p>\n<p><em>namespace n1 <\/em><br \/>\n<em>{<\/em><br \/>\n<em>\/\/ BODY OF THE NAMESPACE n1<\/em><br \/>\n<em>namespace n2 <\/em><br \/>\n<em>{<\/em><br \/>\n<em>\/\/ BODY OF THE NAMESPACE n2<\/em><br \/>\n<em>}<\/em><br \/>\n<em>}<\/em><\/p>\n<p>In order to access these namespaces, we may write the following statements:<\/p>\n<p><em>\/\/ Accessing the members of n2<\/em><\/p>\n<p><em>using namespace n1 :: n2;<\/em><\/p>\n<p><em>\/\/ Accessing the members of n1<\/em><\/p>\n<p><em>using namespace n1<\/em><\/p>\n<p>Here is a C++ program that illustrates the use of nested namespaces:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"null\">#include &lt;iostream&gt;\r\nusing namespace std;\r\n\r\nnamespace n1 \r\n{\r\nvoid function() \r\n{\r\ncout &lt;&lt; \"Namespace n1\" &lt;&lt; endl;\r\n}\r\n\r\nnamespace n2 \r\n{\r\nvoid function() \r\n{\r\ncout &lt;&lt; \"Namespace n2\" &lt;&lt; endl;\r\n}\r\n}\r\n}\r\n\r\nusing namespace n1::n2;\r\nint main () \r\n{\r\n\r\ncout&lt;&lt;\"Welcome to DataFlair tutorials!\"&lt;&lt;endl&lt;&lt;endl;\r\n\r\nfunction();\r\n\r\nreturn 0;\r\n}\r\n<\/pre>\n<p>&nbsp;<\/p>\n<p><strong>Output-<\/strong><\/p>\n<p><a href=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-62028\" src=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp.jpg\" alt=\"Output of Example of Nested Namespace in C++\" width=\"1301\" height=\"616\" srcset=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp.jpg 1301w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-150x71.jpg 150w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-300x142.jpg 300w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-768x364.jpg 768w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-1024x485.jpg 1024w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-520x246.jpg 520w, https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/Output-of-Example-of-Nested-Namespace-in-Cpp-720x340.jpg 720w\" sizes=\"auto, (max-width: 1301px) 100vw, 1301px\" \/><\/a><\/p>\n<h3>Summary<\/h3>\n<p>Namespaces in C++ is basically a small concept but it has a significance in coding. Now, you know why we work with\u00a0\u201cusing\u201d directory in C++. All the topics we covered today are important for a successful programmer.<\/p>\n<p>If you have any queries, feel free to leave a comment below.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Every C++ program contains namespace. If it is not used, an alternative is available which proves to be more complex than namespaces. It is a relatively new concept introduced by the latest C++ standards.&#46;&#46;&#46;<\/p>\n","protected":false},"author":5,"featured_media":62029,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[20172],"tags":[20468,20460,20466,20467,20461,20477],"class_list":["post-61917","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cpp","tag-c-discontiguous-namespace","tag-c-namespace","tag-c-namespace-rules","tag-c-namespace-syntax","tag-c-nested-namespace","tag-c-using-directive"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.4 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn C++ Namespace with Syntax and Example in just 4 Mins! - DataFlair<\/title>\n<meta name=\"description\" content=\"C++ namespace act as declarative region providing scope to identifiers. Learn a syntax, rules, nested &amp; Discontiguous namespace with example and using diretive.\" \/>\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\/cpp-namespace\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn C++ Namespace with Syntax and Example in just 4 Mins! - DataFlair\" \/>\n<meta property=\"og:description\" content=\"C++ namespace act as declarative region providing scope to identifiers. Learn a syntax, rules, nested &amp; Discontiguous namespace with example and using diretive.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/data-flair.training\/blogs\/cpp-namespace\/\" \/>\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=\"2019-07-04T07:16:31+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-10-06T13:42:06+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"802\" \/>\n\t<meta property=\"og:image:height\" content=\"420\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\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":"Learn C++ Namespace with Syntax and Example in just 4 Mins! - DataFlair","description":"C++ namespace act as declarative region providing scope to identifiers. Learn a syntax, rules, nested & Discontiguous namespace with example and using diretive.","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\/cpp-namespace\/","og_locale":"en_US","og_type":"article","og_title":"Learn C++ Namespace with Syntax and Example in just 4 Mins! - DataFlair","og_description":"C++ namespace act as declarative region providing scope to identifiers. Learn a syntax, rules, nested & Discontiguous namespace with example and using diretive.","og_url":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/","og_site_name":"DataFlair","article_publisher":"https:\/\/www.facebook.com\/DataFlairWS\/","article_published_time":"2019-07-04T07:16:31+00:00","article_modified_time":"2021-10-06T13:42:06+00:00","og_image":[{"width":802,"height":420,"url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg","type":"image\/jpeg"}],"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\/cpp-namespace\/#article","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/"},"author":{"name":"DataFlair Team","@id":"https:\/\/data-flair.training\/blogs\/#\/schema\/person\/7f83c342f5d1632d6f7b4b0b0f447823"},"headline":"Learn C++ Namespace with Syntax and Example in just 4 Mins!","datePublished":"2019-07-04T07:16:31+00:00","dateModified":"2021-10-06T13:42:06+00:00","mainEntityOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/"},"wordCount":706,"commentCount":0,"publisher":{"@id":"https:\/\/data-flair.training\/blogs\/#organization"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg","keywords":["C++ Discontiguous Namespace","c++ namespace","C++ Namespace Rules","C++ Namespace Syntax","c++ nested namespace","C++ using Directive"],"articleSection":["C++ Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/data-flair.training\/blogs\/cpp-namespace\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/","url":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/","name":"Learn C++ Namespace with Syntax and Example in just 4 Mins! - DataFlair","isPartOf":{"@id":"https:\/\/data-flair.training\/blogs\/#website"},"primaryImageOfPage":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#primaryimage"},"image":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#primaryimage"},"thumbnailUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg","datePublished":"2019-07-04T07:16:31+00:00","dateModified":"2021-10-06T13:42:06+00:00","description":"C++ namespace act as declarative region providing scope to identifiers. Learn a syntax, rules, nested & Discontiguous namespace with example and using diretive.","breadcrumb":{"@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/data-flair.training\/blogs\/cpp-namespace\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#primaryimage","url":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg","contentUrl":"https:\/\/data-flair.training\/blogs\/wp-content\/uploads\/sites\/2\/2019\/07\/C-Namespace-tutorial.jpg","width":802,"height":420,"caption":"Introduction to C++ Namespace"},{"@type":"BreadcrumbList","@id":"https:\/\/data-flair.training\/blogs\/cpp-namespace\/#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\/cpp\/"},{"@type":"ListItem","position":3,"name":"Learn C++ Namespace with Syntax and Example in just 4 Mins!"}]},{"@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\/7f83c342f5d1632d6f7b4b0b0f447823","name":"DataFlair Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/4cf3a74600d131330b8c481d519afd1574093ed89f6d3396a95393ad223eb7cd?s=96&d=mm&r=g","caption":"DataFlair Team"},"description":"DataFlair Team creates expert-level guides on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our goal is to empower learners with easy-to-understand content. Explore our resources for career growth and practical learning.","url":"https:\/\/data-flair.training\/blogs\/author\/dfteam1\/"}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/61917","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\/5"}],"replies":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/comments?post=61917"}],"version-history":[{"count":12,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/61917\/revisions"}],"predecessor-version":[{"id":103269,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/posts\/61917\/revisions\/103269"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media\/62029"}],"wp:attachment":[{"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/media?parent=61917"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/categories?post=61917"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/data-flair.training\/blogs\/wp-json\/wp\/v2\/tags?post=61917"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}