60 713
Assignments Done
97,9%
Successfully Done
In April 2018

Answer to Question #19715 in Action Script | Flash | Flex | ColdFusion for BHUVANESH I

Question #19715
write a "c" program to count no.of numerals,uppercase,and specia lcharacter
Expert's answer

include <stdio.h>
#include <conio.h>
#include <string.h>
#include <ctype.h>

void main()
{
char str[30];
int i,dig=0,low=0,up=0,sp=0;
clrscr();
printf("Enter string : ");
gets(str);
for(i=0;i<strlen(str);i++)
{
if(str[i]>='0'&&str[i]<='9')
dig++;
else if(str[i]>='a'&&str[i]<='z')
low++;
else if(str[i]>='A'&&str[i]<='Z')
up++;
else
sp++;
}
printf("
digits : %d
lower case letters : %d
upper case letters :
%d
special characters : %d",dig,low,up,sp);

getch();

}


Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions