<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":311,"date":"2021-07-12T19:49:01","date_gmt":"2021-07-12T19:49:01","guid":{"rendered":"https:\/\/www.wikitechy.com\/interview-questions\/?p=311"},"modified":"2021-09-14T06:20:23","modified_gmt":"2021-09-14T06:20:23","slug":"what-is-the-main-difference-between-c-and-cpp","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/","title":{"rendered":"What is the main difference between c and c++ ?"},"content":{"rendered":"<h2 id=\"1-what-is-the-main-difference-between-c-and-c\" class=\"color-pink\" style=\"text-align: justify;\">1. What is the main difference between c and c++ ?<\/h2>\n<div class=\"Content\">\n<div class=\"hddn\">\n<table class=\"table-bordered table-striped table table-responsive\">\n<tbody>\n<tr style=\"text-align: justify;\">\n<th><a href=\"https:\/\/www.wikitechy.com\/tutorials\/c-programming\/\" target=\"_blank\" rel=\"noopener\">C<\/a><\/th>\n<th><a href=\"https:\/\/www.wikitechy.com\/tutorials\/c++\/\" target=\"_blank\" rel=\"noopener\">C++<\/a><\/th>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">C is a structured programming language.<\/td>\n<td class=\"text-leftalign\">C++ is an object oriented programming language.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">C language is not in solving the real time problem.<\/td>\n<td class=\"text-leftalign\">C++ works well in solving real time problem.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\"><a href=\"https:\/\/www.wikitechy.com\/interview-questions\/java\/what-is-polymorphism-in-java\/\" target=\"_blank\" rel=\"noopener\">Polymorphism<\/a>\u00a0is not possible.<\/td>\n<td class=\"text-leftalign\">Polymorphism is used in C++.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">In C,\u00a0malloc()\u00a0and\u00a0calloc()\u00a0Functions are used for<br \/>\n<a href=\"https:\/\/www.wikitechy.com\/tutorials\/c-programming\/dynamic-memory-allocation-in-c\" target=\"_blank\" rel=\"noopener\">Memory Allocation\u00a0<\/a>and free() function<br \/>\nfor memory Deallocating.<\/td>\n<td class=\"text-leftalign\">C++,\u00a0<a href=\"https:\/\/www.wikitechy.com\/tutorials\/c++\/c++-memory-management\" target=\"_blank\" rel=\"noopener\">new and delete operators<\/a>\u00a0are used for Memory Allocating and Deallocating.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">Operator overloading is not possible in C.<\/td>\n<td class=\"text-leftalign\"><a href=\"https:\/\/www.wikitechy.com\/tutorials\/c++\/operator-overloading-in-c++\" target=\"_blank\" rel=\"noopener\">Operator overloading<\/a>\u00a0is one of the greatest Feature of C++.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">No namespace Feature is present in C Language.<\/td>\n<td class=\"text-leftalign\"><a href=\"https:\/\/www.wikitechy.com\/tutorials\/c++\/namespace-in-c++\" target=\"_blank\" rel=\"noopener\">Namespace<\/a>\u00a0Feature is present in C++ for avoiding Name collision.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">scanf()\u00a0function used for input and\u00a0printf()\u00a0function<br \/>\nused for output.<\/td>\n<td class=\"text-leftalign\">Cin function used for input and Cout funtion used for output.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">Polymorphism, Operator Overloading Concept is not<br \/>\npossible in C.<\/td>\n<td class=\"text-leftalign\">Polymorphism, Operator Overloading Concept is the most important feature in C++.<\/td>\n<\/tr>\n<tr style=\"text-align: justify;\">\n<td class=\"text-leftalign\">C requires all the variables to be defined<br \/>\nat the starting of a scope.<\/td>\n<td class=\"text-leftalign\">C++ allows the declaration of variable anywhere in the scope i.e at time of its First use.<\/td>\n<\/tr>\n<tr>\n<td class=\"text-leftalign\" style=\"text-align: justify;\">Exception Handling is not present in C.<\/td>\n<td class=\"text-leftalign\" style=\"text-align: justify;\"><a href=\"https:\/\/www.wikitechy.com\/tutorials\/python\/python-exception\" target=\"_blank\" rel=\"noopener\">Exception Handling<\/a>\u00a0is done with Try and Catch block.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Answer : The main difference between c and c++ is&#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,1757,203,199,214,198,363,209,1756,1755,205,1745,1760,1754,1753,1752,1751,1750,15935,1743,222,1747,196,1759,212,1758,710,207,366,204,15928,217,288,1744,483,206,1749,1741,1742,1746,1748,1761,15833],"class_list":["post-311","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-and-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-comparison-between-c","tag-compatibility-of-c-and-c","tag-dell-international-services-india-pvt-ltd-interview-questions-and-answers","tag-dhfl-pramerica-life-insurance-company-ltd-interview-questions-and-answers","tag-difference-between-c-and-c","tag-difference-between-c-and-c-and-c","tag-difference-between-c-and-c-with-example-program","tag-difference-between-c-and-java","tag-difference-between-c-structures-and-c-structures","tag-differences-between-c-and-c","tag-ecare-technology-labs-interview-questions-and-answers","tag-elico-healthcare-services-ltd-interview-questions-and-answers","tag-flipkart-interview-questions-and-answers","tag-hcl-technol-interview-questions-and-answers","tag-ibm-interview-questions-and-answers","tag-important-differences-between-c-and-c","tag-indecomm-global-services-interview-questions-and-answers","tag-key-differences-between-c-and-c","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-paramatrix-interview-questions-and-answers","tag-peoplestrong-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-similarities-between-c-and-c","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-are-the-fundamental-differences-between-c-and-c","tag-what-is-the-difference-between-c-and-c","tag-zeomega-interview-questions-and-answers"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v22.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>What is the main difference between c and c++ ? - C Interview Questions<\/title>\n<meta name=\"description\" content=\"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language\" \/>\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-the-main-difference-between-c-and-cpp\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"What is the main difference between c and c++ ? - C Interview Questions\" \/>\n<meta property=\"og:description\" content=\"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/\" \/>\n<meta property=\"og:site_name\" content=\"Wikitechy\" \/>\n<meta property=\"article:published_time\" content=\"2021-07-12T19:49:01+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-09-14T06:20:23+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\/what-is-the-main-difference-between-c-and-cpp\/\",\"url\":\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/\",\"name\":\"What is the main difference between c and c++ ? - C Interview Questions\",\"isPartOf\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#website\"},\"datePublished\":\"2021-07-12T19:49:01+00:00\",\"dateModified\":\"2021-09-14T06:20:23+00:00\",\"author\":{\"@id\":\"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757\"},\"description\":\"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/\"]}]},{\"@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 main difference between c and c++ ? - C Interview Questions","description":"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language","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-the-main-difference-between-c-and-cpp\/","og_locale":"en_US","og_type":"article","og_title":"What is the main difference between c and c++ ? - C Interview Questions","og_description":"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language","og_url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/","og_site_name":"Wikitechy","article_published_time":"2021-07-12T19:49:01+00:00","article_modified_time":"2021-09-14T06:20:23+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\/what-is-the-main-difference-between-c-and-cpp\/","url":"https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/","name":"What is the main difference between c and c++ ? - C Interview Questions","isPartOf":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#website"},"datePublished":"2021-07-12T19:49:01+00:00","dateModified":"2021-09-14T06:20:23+00:00","author":{"@id":"https:\/\/www.wikitechy.com\/interview-questions\/#\/schema\/person\/4d5a581fb5470d1560324bddc5e8b757"},"description":"What is the main difference between c and c++ ? - C Interview Questions - The main difference between c and c++ is that , C is a structured programming language","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.wikitechy.com\/interview-questions\/c\/what-is-the-main-difference-between-c-and-cpp\/"]}]},{"@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\/311","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=311"}],"version-history":[{"count":3,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/311\/revisions"}],"predecessor-version":[{"id":3660,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/posts\/311\/revisions\/3660"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/media?parent=311"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/categories?post=311"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/interview-questions\/wp-json\/wp\/v2\/tags?post=311"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}