C Program to check whether a character is digit or alphabet

Опубликовано: 03 Март 2025
на канале: Code Leos
478
24

C Program to check whether a character is digit or alphabet
write a c program to check if given character is digit or alphabet

**My YouTube Channel::::::::
   / @codecafe20  

**My Instagram Account:::::::
https://instagram.com/code_cafe20?igs...

***************************************************Explanation::::::::

We start by declaring a char variable ch to store the user input.

We prompt the user to enter a character using printf and read the input using scanf.

We use two if conditions to check whether the entered character is an alphabet or a digit.

If the entered character falls between 'a' and 'z' or 'A' and 'Z', we can say it is an alphabet.

If the entered character falls between '0' and '9', we can say it is a digit.

If the character is neither an alphabet nor a digit, we print a message saying so.

Finally, we return 0 to indicate that the program has executed successfully.

*************************************************

**Your Queries::::::

c programming
c programming tutorial
c programming language
c programming for beginners
learn c programming
Check whether a character is an alphabet digit or special character
programming in c
c programming basics
Factorial program in c
c programming course
c programming language tutorial
youtube shorts
Shorts
learn java
Java
learn python
python tutorial

**Hashtag:::::::
#c
#clanguage
#code
#coding
#viral
#viralshorts
#short
#shortsvideo
#viralvideo
#shorts
#clanguage
#sumofseries
#100
#how
#cprogramminglanguagebeginners
#cprogramming
#viralshort