{"id":228,"date":"2020-07-19T11:02:38","date_gmt":"2020-07-19T11:02:38","guid":{"rendered":"\/?p=228"},"modified":"2020-07-19T11:02:38","modified_gmt":"2020-07-19T11:02:38","slug":"write-a-c-program-to-sort-integer-values-in-descending-order","status":"publish","type":"post","link":"http:\/\/suryaprakash.com.np\/?p=228","title":{"rendered":"Write a C program to sort integer values in descending order"},"content":{"rendered":"<p><code>\/\/2063.2.a.Write a C program to sort integer values in descending order.<br \/>\n#include&lt;stdio.h&gt;<br \/>\nvoid main()<br \/>\n{<br \/>\nint a[20],i,j,t,n;<br \/>\nprintf(\"enter the size of array:\");<br \/>\nscanf(\"%d\",&amp;n);<br \/>\nprintf(\"enter the element of integer\\n\");<br \/>\nfor(i=0;i&lt;n;i++)<br \/>\n{<br \/>\nscanf(\"%d\",&amp;a[i]);<br \/>\n}<br \/>\nprintf(\"the integers in descending order is:\\n\");<br \/>\nfor(i=0;i&lt;n-1;i++)<br \/>\n{<br \/>\nfor(j=i+1;j&lt;n;j++)<br \/>\n{<br \/>\nif(a[i]&lt;a[j])<br \/>\n{<br \/>\nt=a[i];<br \/>\na[i]=a[j];<br \/>\na[j]=t;<\/p>\n<p>}<br \/>\n}<br \/>\n}<br \/>\nfor(i=0;i&lt;n;i++)<br \/>\n{<br \/>\nprintf(\"\\t%d\",a[i]);<br \/>\n}<br \/>\n}\u00a0<\/code><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-229\" src=\"\/wp-content\/uploads\/2020\/07\/HSEB-300x164.png\" alt=\"\" width=\"300\" height=\"164\" srcset=\"\/wp-content\/uploads\/2020\/07\/HSEB-300x164.png 300w, \/wp-content\/uploads\/2020\/07\/HSEB.png 453w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/\/2063.2.a.Write a C program to sort integer values in descending order. #include&lt;stdio.h&gt; void main() { int a[20],i,j,t,n; printf(&#8220;enter the size &hellip; <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[8],"tags":[],"_links":{"self":[{"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts\/228"}],"collection":[{"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=228"}],"version-history":[{"count":1,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions"}],"predecessor-version":[{"id":230,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts\/228\/revisions\/230"}],"wp:attachment":[{"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=228"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=228"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=228"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}