<br />
<b>Warning</b>:  Undefined array key "global_protection_id" in <b>/home/wikitechy/public_html/interview-questions/wp-content/plugins/content-protector/inc/class-ps-rest-handler.php</b> on line <b>51</b><br />
{"id":4957,"date":"2022-10-07T06:12:45","date_gmt":"2022-10-07T06:12:45","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=4957"},"modified":"2022-10-07T06:12:45","modified_gmt":"2022-10-07T06:12:45","slug":"what-is-l-value-and-r-value-in-c","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/","title":{"rendered":"What is l-value and r-value in C ?"},"content":{"rendered":"<h2 id=\"l-value\" style=\"text-align: justify;\">L Value<\/h2>\n<ul style=\"text-align: justify;\">\n<li>L value or locator value represents an object that occupies some identifiable location in memory.<\/li>\n<li>In an assignment operator the l value can appear on right hand side or left hand side.<\/li>\n<li>Expression which refer to modifiable locations are called as \u201cModifiable L Values\u201d.<\/li>\n<li>An incomplete type or constant attribute cannot have an array type of modifiable value attribute.<\/li>\n<li>Structures and Unions to be a modified lvalues, they should not contain any members with constant attribute.<\/li>\n<li>Storage location will be denoted by an identifier with name,value stored at a location will have the value of the variable.<\/li>\n<li>A lvalue identifier can be modified it refers to a memory location and if the type of it is arithmetic, structure, union or pointer.<\/li>\n<li>Example: If a pointer points to a storage region, then *ptr is a modifiable l value that allocates the storage region to which *ptr points.<\/li>\n<li>In C, this concept was termed \u201cLocator Value\u201d. And referred to expressions that locate objects.<\/li>\n<\/ul>\n<p style=\"text-align: justify;\"><strong>The l-value is one of the following<\/strong><\/p>\n<ul style=\"text-align: justify;\">\n<li>The name of the variable of any type i.e, an identifier of integral, floating, pointer, structure, or union type.<\/li>\n<li>A subscript ([ ]) expression that does not evaluate to an array.<\/li>\n<li>A unary-indirection (*) expression that does not refer to an array<\/li>\n<li>An l-value expression in parentheses.<\/li>\n<li>A\u00a0constobject (a nonmodifiable l-value).<\/li>\n<li>The result of indirection through a pointer, provided that it isn\u2019t a function pointer.<\/li>\n<li>The result of member access through pointer(-&gt; or .)<\/li>\n<\/ul>\n<h2 id=\"r-value\" style=\"text-align: justify;\">R Value<\/h2>\n<ul style=\"text-align: justify;\">\n<li>R- value refer to data value that is stored at some address in memory.<\/li>\n<li>R value is an expression that does not have a value assigned to it which means r value can either right side or left side of an assignment operator.<\/li>\n<\/ul>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-full wp-image-4958 aligncenter\" src=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg\" alt=\"\" width=\"387\" height=\"243\" srcset=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg 387w, https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue-300x188.jpg 300w\" sizes=\"(max-width: 387px) 100vw, 387px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>L Value L value or locator value represents an object that occupies some identifiable location in memory. In an assignment operator the l value can appear on right hand side or left hand side. Expression which refer to modifiable locations are called as \u201cModifiable L Values\u201d. An incomplete type or constant attribute cannot have an [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"passster_activate_protection":false,"passster_protect_child_pages":"","passster_protection_type":"password","passster_password":"","passster_activate_overwrite_defaults":"","passster_headline":"","passster_instruction":"","passster_placeholder":"","passster_button":"","passster_id":"","passster_activate_misc_settings":"","passster_redirect_url":"","passster_hide":"no","passster_area_shortcode":"","gtb_hide_title":false,"gtb_wrap_title":false,"gtb_class_title":"","gtb_remove_headerfooter":false,"footnotes":""},"categories":[1716],"tags":[18857,18855,18854,18853,18863,18856,18859,18858,18861,18864,18862,18860],"class_list":["post-4957","post","type-post","status-publish","format-standard","hentry","category-c","tag-l-value-and-r-value-expressions","tag-lvalue-and-rvalue","tag-lvalue-and-rvalue-in-c","tag-lvalue-and-rvalue-in-c-language","tag-lvalue-and-rvalue-in-c-with-example","tag-lvaules-and-rvalues","tag-understanding-lvalues-and-rvalues-inc","tag-what-are-lvalue-and-rvalue-in-c","tag-what-is-an-lvalue-in-c","tag-what-is-lvalue","tag-what-is-lvalue-in-c","tag-what-is-rvalue-in-c"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is l-value and r-value in C ? - Lvalue and Rvalue<\/title>\n<meta name=\"description\" content=\"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is l-value and r-value in C ? - Lvalue and Rvalue\" \/>\n<meta property=\"og:description\" content=\"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2022-10-07T06:12:45+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg\" \/>\n<meta name=\"author\" content=\"webmaster\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"webmaster\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/\",\"name\":\"What is l-value and r-value in C ? - Lvalue and Rvalue\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg\",\"datePublished\":\"2022-10-07T06:12:45+00:00\",\"dateModified\":\"2022-10-07T06:12:45+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\"},\"description\":\"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg\",\"contentUrl\":\"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg\",\"width\":387,\"height\":243},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/\",\"name\":\"Wikitechy\",\"description\":\"Interview Questions\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4\",\"name\":\"webmaster\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g\",\"caption\":\"webmaster\"},\"sameAs\":[\"https:\/\/www.wikitechy.com\/interview-questions\"],\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"What is l-value and r-value in C ? - Lvalue and Rvalue","description":"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.","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:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/","og_locale":"en_US","og_type":"article","og_title":"What is l-value and r-value in C ? - Lvalue and Rvalue","og_description":"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/","og_site_name":"Wikitechy","article_published_time":"2022-10-07T06:12:45+00:00","og_image":[{"url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg"}],"author":"webmaster","twitter_card":"summary_large_image","twitter_misc":{"Written by":"webmaster","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/","name":"What is l-value and r-value in C ? - Lvalue and Rvalue","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage"},"image":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage"},"thumbnailUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg","datePublished":"2022-10-07T06:12:45+00:00","dateModified":"2022-10-07T06:12:45+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4"},"description":"What is l-value and r-value in C ? - L value or locator value represents an object that occupies some identifiable location in memory.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-l-value-and-r-value-in-c\/#primaryimage","url":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg","contentUrl":"https:\/\/www.wikitechy.com\/interview-questions\/wp-content\/uploads\/2022\/10\/difference-between-lvalue-and-rvalue.jpg","width":387,"height":243},{"@type":"WebSite","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website","url":"https:\/\/www.wikitechy.com\/interview-questions\/","name":"Wikitechy","description":"Interview Questions","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.wikitechy.com\/interview-questions\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/f785ba3ecc599133e65ab6138042a3e4","name":"webmaster","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/155b77fd8cdda3d0913fcb7e7ee63543b0c345d2d8f6dcebda5b0583ab61f967?s=96&d=mm&r=g","caption":"webmaster"},"sameAs":["https:\/\/www.wikitechy.com\/interview-questions"],"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/webmaster\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4957","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=4957"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4957\/revisions"}],"predecessor-version":[{"id":4959,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/4957\/revisions\/4959"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=4957"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=4957"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=4957"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}