0
Write a C program to find whether the given character is an alphabet, digit ,or special character using the if else statement
any body who can help?
4 Antworten
+ 6
Hi,
how far have u come up to now.
Surely u can do a littlebit yourself and link a program.
+ 6
Hint:
#include <ctype.h>
For alphabets use isalpha() function.
For digits use isdigit() function.
For special characters use ispunct() function.
Some examples on this site:
https://www.includehelp.com/c-library-functions/ctype-example-programs.aspx
+ 1
Testing "a == num" is not the way to test a character type for being a digit. C provides library functions (in the ctype.h header) you should use in those cases, as it has been suggested by Ipang. Also, the linked site I think you will find very helpful in understanding what those functions do and how to use them.
Other than that you are close. But you need to chain the if-statements using "else if" to mutually exclude each of the possibilities.
0
thi is where am stuck
https://code.sololearn.com/cOWMB3JianVm/?ref=app