C Program To Check Whether A Character Is UpperCase Or LoweCase

C program to find whether a character is upper case or lower case alphabet. Check out our program below, you can also check our c programs for beginners here. For more programs do subscribe to our blog here.

1.Standard Method


2.Using User Defined Function

1) Read the entered alphabet and store in the variable ch ,using scanf function.

2)Pass the alphabet to the user defined function lucase.

3)lucase function prints “uppercase” if entered alphabet ASCII value is >=65 and <=90,

prints “Lowercase” if entered alphabet ASCII value is >=97 and <=122,otherwise it prints invalid input.


3.Using Pointers

1)Pass the address of entered alphabet to the function lucase as lucase(&ch).

2)Then the pointer variable *ch  of lucase(char *ch)contains the ASCII value of the entered alphabet.

3)If the ASCII value of ch >=65 and <=90 then it prints “upper case”, if ASCII value of ch>=97 and <=122 then it prints “lower case” otherwise it prints “invalid input”.


Add a Comment

Your email address will not be published. Required fields are marked *