<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":2646,"date":"2021-08-28T17:14:35","date_gmt":"2021-08-28T17:14:35","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=2646"},"modified":"2021-09-03T06:21:12","modified_gmt":"2021-09-03T06:21:12","slug":"what-is-the-output-of-this-c-code-recursive-function-in-c-program","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/","title":{"rendered":"What is the output of this C code ? | Recursive Function in C Program"},"content":{"rendered":"<div class=\"TextHeading\">\n<div class=\"hddn\">\n<p class=\"color-pink\">What is the output of this C code ?<\/p>\n<div class=\"CodeContent\">\n<div class=\"hddn\">\n<figure class=\"highlight\">\n<pre><code class=\"hljs bash\" data-lang=\"\"><span class=\"nt\">Function <span class=\"hljs-function\"><span class=\"hljs-title\">main<\/span><\/span>() {\r\n  <span class=\"hljs-built_in\">integer<\/span> a = <span class=\"hljs-number\">5<\/span>, b = <span class=\"hljs-number\">7<\/span>\r\n  Switch(a) {\r\n    Case <span class=\"hljs-number\">5<\/span>: <span class=\"hljs-built_in\">print<\/span> <span class=\"hljs-string\">\"I am 5\"<\/span>\r\n    Break\r\n    Case b: <span class=\"hljs-built_in\">print<\/span> <span class=\"hljs-string\">\"I am not 5\"<\/span>\r\n    Break\r\n    Default: <span class=\"hljs-built_in\">print<\/span> <span class=\"hljs-string\">\"I am different\"<\/span>\r\n  }\r\n}\r\n<\/span><\/code><\/pre>\n<\/figure>\n<\/div>\n<\/div>\n<div class=\"row\">\n<div class=\"col-sm-4\">\n<p>A. I am 5<\/p>\n<\/div>\n<div class=\"col-sm-4\">\n<p>B. I am not 5<\/p>\n<\/div>\n<div class=\"col-sm-4\">\n<p>C. I am different<\/p>\n<\/div>\n<div class=\"col-sm-4\">\n<p>D. Error<\/p>\n<\/div>\n<div class=\"col-sm-4\">\n<p>E. None of these<\/p>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<h3 id=\"answer-d-error\"><b>Answer :\u00a0<\/b>D. Error<\/h3>\n<div class=\"subheading\">\n<h2 id=\"explanation\">Explanation:<\/h2>\n<\/div>\n<div class=\"Content\">\n<div class=\"hddn\">\n<ul>\n<li>Break doesn\u2019t have &#8220;;&#8221; (Semi Colon missing in break command)<\/li>\n<\/ul>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer :\u00a0D. Error<\/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":[16505],"tags":[2023,2024,2037,2025,2038,2026,2027,2028,2029,2040,2043,2039,2030,2031,2032,2041,2042,2034,16431,2035,2036],"class_list":["post-2646","post","type-post","status-publish","format-standard","hentry","category-recursion-and-iteration","tag-algorithm-for-switch-case-in-c","tag-c-program-for-switch-case-using-function","tag-c-programming-switch-case-examples","tag-c-programming-switch-case-examples-programs","tag-c-programming-switch-case-programs","tag-c-switch-case-statement","tag-how-does-the-switch-and-break-work-in-c","tag-java-switch-statement","tag-program-for-switch-case-with-and-without-break-statement","tag-switch-case","tag-switch-case-c","tag-switch-case-example-in-c","tag-switch-case-exercises-in-c","tag-switch-case-in-c-programming-examples","tag-switch-case-in-c-programming-questions","tag-switch-case-program-in-c","tag-switch-case-statement-in-c-programming","tag-switch-statement-in-c","tag-tcs-ninja-coding-questions-with-answers","tag-what-is-switch-condition","tag-while-c-programming"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is the output of this C code ? - Recursive Function in C Program<\/title>\n<meta name=\"description\" content=\"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).\" \/>\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\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the output of this C code ? - Recursive Function in C Program\" \/>\n<meta property=\"og:description\" content=\"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-08-28T17:14:35+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-03T06:21:12+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\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/\",\"name\":\"What is the output of this C code ? - Recursive Function in C Program\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"datePublished\":\"2021-08-28T17:14:35+00:00\",\"dateModified\":\"2021-09-03T06:21:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/\"]}]},{\"@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":"What is the output of this C code ? - Recursive Function in C Program","description":"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).","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\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/","og_locale":"en_US","og_type":"article","og_title":"What is the output of this C code ? - Recursive Function in C Program","og_description":"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/","og_site_name":"Wikitechy","article_published_time":"2021-08-28T17:14:35+00:00","article_modified_time":"2021-09-03T06:21:12+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\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/","name":"What is the output of this C code ? - Recursive Function in C Program","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-08-28T17:14:35+00:00","dateModified":"2021-09-03T06:21:12+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is the output of this C code ? - Recursive Function in C Program - Break doesn\u2019t have semi colon (Semi Colon missing in break command).","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/recursion-and-iteration\/what-is-the-output-of-this-c-code-recursive-function-in-c-program\/"]}]},{"@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\/2646","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=2646"}],"version-history":[{"count":1,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/2646\/revisions"}],"predecessor-version":[{"id":2658,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/2646\/revisions\/2658"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=2646"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=2646"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=2646"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}