{"id":63,"date":"2021-09-18T07:49:56","date_gmt":"2021-09-18T07:49:56","guid":{"rendered":"https:\/\/ethosspace.com\/programmers\/?p=63"},"modified":"2021-10-11T11:54:59","modified_gmt":"2021-10-11T11:54:59","slug":"c-program-to-check-upper-or-lower-case-character-without-function","status":"publish","type":"post","link":"https:\/\/ethosspace.com\/programmers\/c-program-to-check-upper-or-lower-case-character-without-function\/","title":{"rendered":"C Program to check upper or lower case character without Function."},"content":{"rendered":"\n<p>Program is accepting any character from user. We compare user input with ASCII value of A to Z or a to z. ASCII value of lower case a to z start from 97 to 122. ASCII value of uppercase A to Z start from 65 to 90.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<pre class=\"wp-block-code\"><code>\/******************************************************************\nProgram Name: Write program to check whether given character is a \ndigit or character in lowercase or uppercase alphabet without using any function\n**********************************************************\/\n#include&lt;stdio.h&gt;\n#include&lt;conio.h&gt;\n void main()\n {\n   \/\/variable declaration to store user input\n   char ch;\n   \/\/ASCII value of a to z is between 97 to 122\n   \/\/ASCII value of A to Z is between 65 to 90\n   printf(\"\\n\\tEnter Character : \");\n   ch=getchar();\n   if((ch&gt;=48)&amp;&amp;(ch&lt;=57))\n     {\n      printf(\"\\n\\t %c is integer \",ch);\n     }\n   else\n    {\n      if((ch&gt;=97)&amp;&amp;(ch&lt;=122))\n\t   printf(\"\\n\\t '%c' is Lowercase alphabet character \",ch);\n      else\n      {\n\tif((ch&gt;=65)&amp;&amp;(ch&lt;=90))\n\t   printf(\"\\n\\t '%c' is Uppercase alphabet character \",ch);\n\t   else\n    printf(\"\\n\\t '%c' is not alphabet or number\",ch);\n    }\n    }\n    getch();\n }<\/code><\/pre>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<h4 class=\"wp-block-heading\">Output<\/h4>\n\n\n\n<div class=\"wp-block-columns has-white-color has-cyan-bluish-gray-background-color has-text-color has-background is-layout-flex wp-container-core-columns-is-layout-9d6595d7 wp-block-columns-is-layout-flex\">\n<div class=\"wp-block-column is-layout-flow wp-block-column-is-layout-flow\">\n<pre class=\"wp-block-code\"><code>Enter Character : D\n\n'D' is Uppercase alphabet character <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>    Enter Character : d\n     'd' is Lowercase alphabet character<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>      \n        Enter Character : $\n         '$' is not alphabet or number<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\nEnter Character : 1\n\n\t 1 is integer \n\n<\/code><\/pre>\n<\/div>\n<\/div>\n\n\n","protected":false},"excerpt":{"rendered":"<p>Program is accepting any character from user. We compare user input with ASCII value of A to Z or a to z. ASCII value of lower case a to z start from 97 to 122. ASCII value of uppercase A to Z start from 65 to 90. Output<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_uag_custom_page_level_css":"","footnotes":""},"categories":[6],"tags":[],"class_list":["post-63","post","type-post","status-publish","format-standard","hentry","category-c-language"],"aioseo_notices":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"sparkling-featured":false,"sparkling-featured-fullwidth":false,"tab-small":false},"uagb_author_info":{"display_name":"program45_-rt8nb","author_link":"https:\/\/ethosspace.com\/programmers\/author\/program45_-rt8nb\/"},"uagb_comment_info":0,"uagb_excerpt":"Program is accepting any character from user. We compare user input with ASCII value of A to Z or a to z. ASCII value of lower case a to z start from 97 to 122. ASCII value of uppercase A to Z start from 65 to 90. Output","_links":{"self":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/63","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/comments?post=63"}],"version-history":[{"count":5,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/63\/revisions"}],"predecessor-version":[{"id":282,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/posts\/63\/revisions\/282"}],"wp:attachment":[{"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/media?parent=63"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/categories?post=63"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ethosspace.com\/programmers\/wp-json\/wp\/v2\/tags?post=63"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}