{"id":238,"date":"2020-07-22T17:02:59","date_gmt":"2020-07-22T17:02:59","guid":{"rendered":"\/?p=238"},"modified":"2022-04-13T05:31:35","modified_gmt":"2022-04-13T05:31:35","slug":"write-a-c-program-to-display-the-name-of-day-on-the-basis-of-entered-number-1-to-7-for-example-1-for-sunday","status":"publish","type":"post","link":"http:\/\/suryaprakash.com.np\/?p=238","title":{"rendered":"write a C program to display the name of day on the basis of entered number 1 to 7. for example, 1 for sunday."},"content":{"rendered":"<p><code><br \/>\n#include&lt;stdio.h&gt;<br \/>\nvoid main()<br \/>\n{<br \/>\nint choice;<br \/>\nprintf(\"choose a number from 1 to 7:\");<br \/>\nscanf(\"%d\",&amp;choice);<br \/>\nswitch(choice)<br \/>\n{<br \/>\ncase 1: printf(\"sunday\");<br \/>\nbreak;<br \/>\ncase 2: printf(\"monday\");<br \/>\nbreak;<br \/>\ncase 3: printf(\"tuesday\");<br \/>\nbreak;<br \/>\ncase 4: printf(\"wednesday\");<br \/>\nbreak;<br \/>\ncase 5: printf(\"thrusday\");<br \/>\nbreak;<br \/>\ncase 6: printf(\"friday\");<br \/>\nbreak;<br \/>\ncase 7: printf(\"saturday\");<br \/>\nbreak;<br \/>\ndefault: printf(\"wrong choice\");<br \/>\n}<br \/>\n}<\/code><\/p>\n<p><img loading=\"lazy\" class=\"alignnone size-medium wp-image-239\" src=\"\/wp-content\/uploads\/2020\/07\/choice1-300x116.png\" alt=\"\" width=\"300\" height=\"116\" srcset=\"\/wp-content\/uploads\/2020\/07\/choice1-300x116.png 300w, \/wp-content\/uploads\/2020\/07\/choice1.png 440w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/> <img loading=\"lazy\" class=\"alignnone size-medium wp-image-240\" src=\"\/wp-content\/uploads\/2020\/07\/choice2-300x104.png\" alt=\"\" width=\"300\" height=\"104\" srcset=\"\/wp-content\/uploads\/2020\/07\/choice2-300x104.png 300w, \/wp-content\/uploads\/2020\/07\/choice2.png 446w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/p>\n","protected":false},"excerpt":{"rendered":"<p>#include&lt;stdio.h&gt; void main() { int choice; printf(&#8220;choose a number from 1 to 7:&#8221;); scanf(&#8220;%d&#8221;,&amp;choice); switch(choice) { case 1: printf(&#8220;sunday&#8221;); break; &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\/238"}],"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=238"}],"version-history":[{"count":1,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions"}],"predecessor-version":[{"id":241,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=\/wp\/v2\/posts\/238\/revisions\/241"}],"wp:attachment":[{"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=238"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=238"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/suryaprakash.com.np\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=238"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}