- Program :
#include<conio.h>
#include<ctype.h>
void main() {
char val1 = 's';
char val2 = '8';
clrscr();
printf("\n----------------USAGE OF ISDIGIT()----------------");
if(isdigit(val1))
printf("The character is a digit\n");
else
printf("The character is not a digit\n");
if(isdigit(val2))
printf("The character is a digit\n");
else
printf("The character is not a digit");
getch();
}
- Output :
No comments:
Post a Comment