Search
 
SCRIPT & CODE EXAMPLE
 

C

Letters and Digits Total

#include <stdio.h>
#include <string.h>
 
int main()
{
    char s[1000]; 
    int i,alphabets=0,digits=0,specialcharacters=0;
 
    printf("Enter  the string : ");
    gets(s);
     
    for(i=0;s[i];i++)  
    {
        if((s[i]>=65 && s[i]<=90)|| (s[i]>=97 && s[i]<=122) )
          alphabets++;
        else if(s[i]>=48 && s[i]<=57)
         digits++;
        else
         specialcharacters++;
 
 	}
 	
     
    printf("Alphabets = %d
",alphabets);
    printf("Digits = %d
",digits);
    printf("Special characters = %d", specialcharacters);
    
 
    return 0;
}
Comment

PREVIOUS NEXT
Code Example
C :: C static libraries creation 
C :: counting 7s in an integer c 
C :: How to open terminal cs50 ide 
C :: networkx remove attributes 
C :: getopt optstr 
C :: logarithmus c math.h 
C :: c language dictionary implemet 
C :: what to do after autoencoder training 
C :: ::template 
C :: how much larger integer i can input in c language? 
C :: C program to Increase 1 to all of the given Integer Digit 
C :: rainmaker simple project 
C :: convert integer to float in c 
C :: email dev Microsoft Outlook 2007 items all aligned left or aligned wrong 
C :: countoddevenDifference 
C :: c declare float 
C :: printf("%d", 10 ? 0 ? 5:1:1:12) what will print 
C :: arrays c 
Dart :: flutter delay 
Dart :: flutter statusbar height 
Dart :: How to Create Number Inputfield in Flutter? 
Dart :: switch to another flutter channel eg. $ flutter channel beta $ flutter channel stable 
Dart :: undeline to text in flutter 
Dart :: dart create id 
Dart :: int to char dart 
Dart :: alertdialog flutter outside click disble 
Dart :: Add image with circular shape from corners in Flutter 
Dart :: flutter floting action button elevation 
Dart :: dart data class generator 
Dart :: flutter safearea 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =