<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":332,"date":"2021-07-12T20:43:35","date_gmt":"2021-07-12T20:43:35","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=332"},"modified":"2021-09-14T05:58:33","modified_gmt":"2021-09-14T05:58:33","slug":"explain-call-by-value-in-c-language","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/","title":{"rendered":"Explain Call by Value in C language ?"},"content":{"rendered":"<h2 id=\"explain-call-by-value-in-c-language\" class=\"color-pink\" style=\"text-align: justify;\">Explain Call by Value in C language ?<\/h2>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"call-by-value\">Call by value<\/h2>\n<\/div>\n<div class=\"Content\" style=\"text-align: justify;\">\n<div class=\"hddn\">\n<ul>\n<li>In call by value, original value is not modified.<\/li>\n<li>In call by value, value being passed to the function is locally stored by the function parameter in stack memory location. If you change the value of function parameter, it is changed for the current function only.<\/li>\n<li>It will not change the value of variable inside the caller method such as main().<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<div class=\"text-center row\" style=\"text-align: justify;\"><\/div>\n<div class=\"subheading\" style=\"text-align: justify;\">\n<h2 id=\"sample-code\" class=\"color-green\">Sample Code<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-c code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">#include&lt;stdio.h&gt;<br\/>void change(int num) <br\/>{    <br\/>    printf(&quot;Before adding value inside function num=%d \\n&quot;,num);    <br\/>    num=num+100;    <br\/>    printf(&quot;After adding value inside function num=%d \\n&quot;, num);    <br\/>}    <br\/>int main() <br\/>{    <br\/>    int x=100;    <br\/>    printf(&quot;Before function call x=%d \\n&quot;, x);    <br\/>    change(x);\/\/passing value in function    <br\/>    printf(&quot;After function call x=%d \\n&quot;, x);    <br\/>    return 0;  <br\/>} <\/code><\/pre> <\/div>\n<div class=\"TextHeading\">\n<div class=\"hddn\">\n<h2 id=\"output\" class=\"color-green\">Output<\/h2>\n<div class=\"code-embed-wrapper\"> <div class=\"code-embed-infos\"> <\/div> <pre class=\"language-c code-embed-pre line-numbers\"  data-start=\"1\" data-line-offset=\"0\"><code class=\"language-c code-embed-code\">Before function call x=100 <br\/>Before adding value inside function num=100<br\/>After adding value inside function num=200<br\/>After function call x=100<\/code><\/pre> <\/div>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : In call by value, original value is not modified&#8230;<\/p>\n","protected":false},"author":2,"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":[1739,491,1740,211,1934,1935,1946,1947,1936,1937,1949,1938,1939,1954,1951,1950,1940,1953,203,199,214,198,363,209,205,1941,1745,1948,1942,1743,222,1952,1943,1944,1747,196,212,710,207,366,204,217,15927,288,1744,483,206,1741,1742,1746,1945],"class_list":["post-332","post","type-post","status-publish","format-standard","hentry","category-c","tag-accentur-interview-questions-and-answers","tag-applied-materials-interview-questions-and-answers","tag-asian-paints-ltd-interview-questions-and-answers","tag-bosch-india-software-interview-questions-and-answers","tag-c-program-to-implement-call-by-value-using-functions","tag-call-by-reference-program-in-c","tag-call-by-value","tag-call-by-value-and-call-by-reference","tag-call-by-value-and-call-by-reference-in-c","tag-call-by-value-and-call-by-reference-in-c-language-in-hindi","tag-call-by-value-and-call-by-reference-in-java","tag-call-by-value-and-call-by-reference-program-in-c","tag-call-by-value-c","tag-call-by-value-definition","tag-call-by-value-example","tag-call-by-value-in-c","tag-call-by-value-in-java","tag-call-by-value-program-in-c","tag-capgemini-interview-questions-and-answers","tag-casting-networks-india-pvt-limited-interview-questions-and-answers","tag-cgi-group-inc-interview-questions-and-answers","tag-chetu-interview-questions-and-answers","tag-ciena-corporation-interview-questions-and-answers","tag-collabera-technologies-interview-questions-and-answers","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-describe-call-by-value-function","tag-dhfl-pramerica-life-insurance-company-ltd-interview-questions-and-answers","tag-difference-between-call-by-value-and-call-by-reference","tag-difference-between-call-by-value-and-reference-in-c","tag-elico-healthcare-services-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-function-call-by-value","tag-function-call-by-value-in-c","tag-function-call-by-value-in-c-programming","tag-hcl-technol-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-indecomm-global-services-interview-questions-and-answers","tag-mavenir-interview-questions-and-answers","tag-mphasis-interview-questions-and-answers","tag-netapp-interview-questions-and-answers","tag-oracle-corporation-interview-questions-and-answers","tag-peoplestrong-interview-questions-and-answers","tag-plintron-interview-questions-and-answers","tag-r-systems-interview-questions-and-answers","tag-raqmiyat-information-technologies-pvt-ltd-interview-questions-and-answers","tag-reliance-industries-ltd-interview-questions-and-answers","tag-sap-labs-india-pvt-ltd-interview-questions-and-answers","tag-tata-aia-life-insurance-interview-questions-and-answers","tag-tech-mahindr-interview-questions-and-answers","tag-the-linde-group-interview-questions-and-answers","tag-what-is-call-by-value"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Explain Call by Value in C language ? - C Interview Questions<\/title>\n<meta name=\"description\" content=\"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function\" \/>\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\/explain-call-by-value-in-c-language\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Explain Call by Value in C language ? - C Interview Questions\" \/>\n<meta property=\"og:description\" content=\"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-12T20:43:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-14T05:58:33+00:00\" \/>\n<meta name=\"author\" content=\"Editor\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Editor\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"1 minute\" \/>\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\/explain-call-by-value-in-c-language\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/\",\"name\":\"Explain Call by Value in C language ? - C Interview Questions\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"datePublished\":\"2021-07-12T20:43:35+00:00\",\"dateModified\":\"2021-09-14T05:58:33+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/\"]}]},{\"@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\/4d5a581fb5470d1560324bddc5e8b757\",\"name\":\"Editor\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g\",\"caption\":\"Editor\"},\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Explain Call by Value in C language ? - C Interview Questions","description":"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function","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\/explain-call-by-value-in-c-language\/","og_locale":"en_US","og_type":"article","og_title":"Explain Call by Value in C language ? - C Interview Questions","og_description":"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/","og_site_name":"Wikitechy","article_published_time":"2021-07-12T20:43:35+00:00","article_modified_time":"2021-09-14T05:58:33+00:00","author":"Editor","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Editor","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/","name":"Explain Call by Value in C language ? - C Interview Questions","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-07-12T20:43:35+00:00","dateModified":"2021-09-14T05:58:33+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"Explain Call by Value in C language ? - C Interview Questions - In call by value, original value is not modified.In call by value, value being passed to the function","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/c\/explain-call-by-value-in-c-language\/"]}]},{"@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\/4d5a581fb5470d1560324bddc5e8b757","name":"Editor","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/e9531079fe7e07841b7b156c04d65e5f39d4adfd18b6ffe3edfff8ca5aab85b5?s=96&d=mm&r=g","caption":"Editor"},"url":"https:\/\/www.wikitechy.com\/interview-questions\/author\/editor\/"}]}},"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/332","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\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/comments?post=332"}],"version-history":[{"count":4,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/332\/revisions"}],"predecessor-version":[{"id":3647,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/332\/revisions\/3647"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=332"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=332"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=332"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}