{"id":583,"date":"2012-03-02T18:20:15","date_gmt":"2012-03-02T18:20:15","guid":{"rendered":"http:\/\/www.websitedesignwebsitedevelopment.com\/?p=583"},"modified":"2014-03-19T09:14:03","modified_gmt":"2014-03-19T09:14:03","slug":"c-language-file-include-example-and-minimum-element-search-function-from-an-array","status":"publish","type":"post","link":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/","title":{"rendered":"C Language File Include Example and Minimum Element Search Function from an Array"},"content":{"rendered":"<p>#include &lt;cstdlib&gt;<br \/>\n#include &lt;iostream&gt;<\/p>\n<p>using namespace std;<br \/>\n#include &#8220;header.h&#8221;<\/p>\n<p>int main(int argc, char *argv[])<br \/>\n{<br \/>\ncout &lt;&lt; &#8220;Roll No. mc100200752\\n\\nAssignment: CS301 &#8211; 4\\n\\n&#8221;;<br \/>\ncout &lt;&lt; &#8220;Question:\\nWrite a program in c++ that takes any no&#8221;;<br \/>\ncout &lt;&lt; &#8221; of elements through command prompt from&#8221;;<br \/>\ncout &lt;&lt; &#8220;user and saves it in an array. Then convert it into sorted format with&#8221;;<br \/>\ncout &lt;&lt; &#8221; minimum heap sort using your own coded implementation.\\n\\nAnswer:\\n\\n&#8221;;<\/p>\n<p>int no,elements[no],i=0,j=0;<\/p>\n<p>cout &lt;&lt; &#8220;Enter no. of elements you want?: &#8220;;\u00a0\u00a0\u00a0 cin &gt;&gt; no;<\/p>\n<p>cout &lt;&lt; &#8220;This program will get &#8221; &lt;&lt; no &lt;&lt; &#8221; no of elements and then will convert them into sorted formate with min heap.\\n\\n&#8221;;<\/p>\n<p>for(i;i&lt;no;i++)<br \/>\n{<br \/>\ncout &lt;&lt; &#8220;\\nPlease enter any numeric value: &#8220;;<br \/>\ncin &gt;&gt; elements[i];<br \/>\n}<\/p>\n<p>cout &lt;&lt; &#8220;\\n\\nHere is the sorted format with min heap:\\n\\n&#8221;;<\/p>\n<p>minimum(elements,no);<\/p>\n<p>cout &lt;&lt; &#8220;\\n\\n&#8221;;<\/p>\n<p>system(&#8220;PAUSE&#8221;);<br \/>\nreturn EXIT_SUCCESS;<br \/>\n}<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n<p>\/\/Include File: #include &#8220;header.h&#8221;<\/p>\n<p>int minimum(int arr[],int no)<br \/>\n{<\/p>\n<p>int temp;<br \/>\nfor(int i=0;i&lt;no;i++)<br \/>\n{<br \/>\nfor(int j=0;j&lt;(no-i);j++)<br \/>\n{<br \/>\nif(arr[j]&gt;arr[j+1])<br \/>\n{<br \/>\ntemp=arr[j];<br \/>\narr[j]=arr[j+1];<br \/>\narr[j+1]=temp;<br \/>\n}<br \/>\n}<br \/>\n}<\/p>\n<p>for(int i=0;i&lt;no;i++)<br \/>\n{<br \/>\ncout&lt;&lt;arr[i]&lt;&lt;&#8221; &#8220;;<br \/>\ncout&lt;&lt;endl;<br \/>\n}<\/p>\n<p>return 1;<br \/>\n}<\/p>\n","protected":false},"excerpt":{"rendered":"<p>#include &lt;cstdlib&gt; #include &lt;iostream&gt; using namespace std; #include &#8220;header.h&#8221; int main(int argc, char *argv[]) { cout &lt;&lt; &#8220;Roll No. mc100200752\\n\\nAssignment: CS301 &#8211; 4\\n\\n&#8221;; cout &lt;&lt; &#8220;Question:\\nWrite a program in c++ that takes any no&#8221;; cout &lt;&lt; &#8221; of elements through command prompt from&#8221;; cout &lt;&lt; &#8220;user and saves it in an array. Then convert it [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[31],"tags":[],"class_list":["post-583","post","type-post","status-publish","format-standard","hentry","category-c"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.9 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>C Language File Include Example and Minimum Element Search Function from an Array<\/title>\n<meta name=\"description\" content=\"C Language File Include Example and Minimum Element Search Function from an Array\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"C Language File Include Example and Minimum Element Search Function from an Array\" \/>\n<meta property=\"og:description\" content=\"C Language File Include Example and Minimum Element Search Function from an Array\" \/>\n<meta property=\"og:url\" content=\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\" \/>\n<meta property=\"og:site_name\" content=\"AndroidBubble Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453\" \/>\n<meta property=\"article:published_time\" content=\"2012-03-02T18:20:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2014-03-19T09:14:03+00:00\" \/>\n<meta name=\"author\" content=\"Fahad\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Fahad\" \/>\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\":\"Article\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\"},\"author\":{\"name\":\"Fahad\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"headline\":\"C Language File Include Example and Minimum Element Search Function from an Array\",\"datePublished\":\"2012-03-02T18:20:15+00:00\",\"dateModified\":\"2014-03-19T09:14:03+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\"},\"wordCount\":256,\"articleSection\":[\"C++\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\",\"url\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\",\"name\":\"C Language File Include Example and Minimum Element Search Function from an Array\",\"isPartOf\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\"},\"datePublished\":\"2012-03-02T18:20:15+00:00\",\"dateModified\":\"2014-03-19T09:14:03+00:00\",\"author\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\"},\"description\":\"C Language File Include Example and Minimum Element Search Function from an Array\",\"breadcrumb\":{\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/androidbubble.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Website Development\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"C++\",\"item\":\"https:\/\/androidbubble.com\/blog\/category\/website-development\/c\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"C Language File Include Example and Minimum Element Search Function from an Array\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#website\",\"url\":\"https:\/\/androidbubble.com\/blog\/\",\"name\":\"AndroidBubble Blog\",\"description\":\"Articles &amp; Posts\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/androidbubble.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7\",\"name\":\"Fahad\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g\",\"caption\":\"Fahad\"},\"sameAs\":[\"http:\/\/www.androidbubbles.com\/\",\"https:\/\/x.com\/phpFlex\"],\"url\":\"https:\/\/androidbubble.com\/blog\/author\/admin\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"C Language File Include Example and Minimum Element Search Function from an Array","description":"C Language File Include Example and Minimum Element Search Function from an Array","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:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/","og_locale":"en_US","og_type":"article","og_title":"C Language File Include Example and Minimum Element Search Function from an Array","og_description":"C Language File Include Example and Minimum Element Search Function from an Array","og_url":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/","og_site_name":"AndroidBubble Blog","article_publisher":"https:\/\/www.facebook.com\/pages\/Website-Design-Website-Development\/172363336135453","article_published_time":"2012-03-02T18:20:15+00:00","article_modified_time":"2014-03-19T09:14:03+00:00","author":"Fahad","twitter_misc":{"Written by":"Fahad","Est. reading time":"1 minute"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#article","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/"},"author":{"name":"Fahad","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"headline":"C Language File Include Example and Minimum Element Search Function from an Array","datePublished":"2012-03-02T18:20:15+00:00","dateModified":"2014-03-19T09:14:03+00:00","mainEntityOfPage":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/"},"wordCount":256,"articleSection":["C++"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/","url":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/","name":"C Language File Include Example and Minimum Element Search Function from an Array","isPartOf":{"@id":"https:\/\/androidbubble.com\/blog\/#website"},"datePublished":"2012-03-02T18:20:15+00:00","dateModified":"2014-03-19T09:14:03+00:00","author":{"@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7"},"description":"C Language File Include Example and Minimum Element Search Function from an Array","breadcrumb":{"@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/androidbubble.com\/blog\/website-development\/c\/c-language-file-include-example-and-minimum-element-search-function-from-an-array\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/androidbubble.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Website Development","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/"},{"@type":"ListItem","position":3,"name":"C++","item":"https:\/\/androidbubble.com\/blog\/category\/website-development\/c\/"},{"@type":"ListItem","position":4,"name":"C Language File Include Example and Minimum Element Search Function from an Array"}]},{"@type":"WebSite","@id":"https:\/\/androidbubble.com\/blog\/#website","url":"https:\/\/androidbubble.com\/blog\/","name":"AndroidBubble Blog","description":"Articles &amp; Posts","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/androidbubble.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/0a833b633f744c3a5e0de7c9a94e71f7","name":"Fahad","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/androidbubble.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/afab5bcad71955d142a69df1758e6710aed4ab9cc2b5da28c54a7c3f39801b73?s=96&d=mm&r=g","caption":"Fahad"},"sameAs":["http:\/\/www.androidbubbles.com\/","https:\/\/x.com\/phpFlex"],"url":"https:\/\/androidbubble.com\/blog\/author\/admin\/"}]}},"views":424,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/583","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/comments?post=583"}],"version-history":[{"count":1,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/583\/revisions"}],"predecessor-version":[{"id":584,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/posts\/583\/revisions\/584"}],"wp:attachment":[{"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/media?parent=583"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/categories?post=583"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/androidbubble.com\/blog\/wp-json\/wp\/v2\/tags?post=583"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}