-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprogram174.c
More file actions
47 lines (35 loc) · 861 Bytes
/
Copy pathprogram174.c
File metadata and controls
47 lines (35 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#include<stdio.h>
void CountCapitalSmallDigit(char *str)
{
int iCountSmall = 0;
int iCountCap = 0;
int iCountDigit = 0;
while(*str != '\0')
{
if((*str >= 'a') && (*str <= 'z'))
{
iCountSmall++;
}
else if((*str >= 'A') && (*str <= 'Z'))
{
iCountCap++;
}
else if((*str >= '0') && (*str <= '9'))
{
iCountDigit++;
}
str++;
}
printf("Number of Small Characracter are : %d\n",iCountSmall);
printf("Number of Capital Characracter are : %d\n",iCountCap);
printf("Number of Digit Characracter are : %d",iCountDigit);
}
int main()
{
char Arr[50] = {'\0'};
printf("Enter String :");
scanf("%[^'\n']s",Arr);
CountCapitalSmallDigit(Arr);
printf("\n");
return 0;
}