Write a function that uses character handling library functions to determine the number of upper case, lower case, digits, spaces and punctuation characters in the specified text

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

int main()

{

int length, i;

int alpha = 0, punct = 0, digit = 0, lower = 0, upper = 0,

spaces = 0, others = 0;

char buffer[150] = “English Language consists of letters

from A to Z and digits 1 to 9 which are

used to form : words, sentences and

paragraphs!!!”;

length = strlen(buffer);

for ( i=0; i<length; i++ )

{

if( isalpha( buffer[i] ))

{

alpha++;

if ( islower( buffer[i] ))

lower++;

else

upper++;

}

else if (isdigit(buffer[i] ))

{

digit++;

}
else if (isspace(buffer[i])){

spaces++;

}

else if (ispunct(buffer[i])){

punct++;

}
else

others++;

}

printf(“The number of lowercase letters = %d\n”, lower);

printf(“The number of uppercase letters = %d\n”, upper);

printf(“The number of spaces = %d\n”, spaces);

printf(“The number of punctuation characters = %d\n”, punct);

printf(“The number of alphabets = %d\n”, alpha);

printf(“The number of digits = %d\n”, digit);

}