Home Basic Loop Array string Function Pointer Contact STUDY

# AHF    C    PROGRAM    SOLVING

### String_ count vowel and consonant

```
// AHF C PROGRAM SOLVING

//solving here 2_D   ARRAY 	programming problem

#include
#define pf printf

int main()
{

int i,count=0,c=0,p=0,cons;

char str,ch;

pf("Enter the string: ");
gets(str);

for(i=0;str[i]!='\0';i++)
{
{
if(str[i]=='A'||str[i]=='E'||str[i]=='I'||str[i]=='O'||str[i]=='U'||
str[i]=='a'||str[i]=='e'||str[i]=='i'||str[i]=='o'||str[i]=='u')
count++;    //counting vowel
}
if(str[i]==' ')
{
c++;    //counting space
}
if(ispunct(str[i])>0)
{
p++;    //counting punctuation number
}
}

//deleting vowel, space and punctuation character
cons=i-(c+count+p);

pf("\nThe total vowel in the string= %d",count);

pf("\nThe total consonant in the string= %d",cons);

return 0;
}

```
OUTPUT:
{"ft_lang_label":"__label__en","ft_lang_prob":0.7483237,"math_prob":0.9765993,"size":1896,"snap":"2019-26-2019-30","text_gpt3_token_len":468,"char_repetition_ratio":0.13794926,"word_repetition_ratio":0.013605442,"special_character_ratio":0.27900845,"punctuation_ratio":0.10880829,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9702238,"pos_list":[0],"im_url_duplicate_count":[null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2019-07-19T16:32:18Z\",\"WARC-Record-ID\":\"<urn:uuid:fed3845e-97b1-4ccd-871a-020fe6c4113b>\",\"Content-Length\":\"13570\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:a035aee0-1915-44a2-9056-f95f2593e2ce>\",\"WARC-Concurrent-To\":\"<urn:uuid:f9501251-1483-4085-9f6d-09a042bd05d7>\",\"WARC-IP-Address\":\"93.158.205.43\",\"WARC-Target-URI\":\"https://alsultana.net/s6.php\",\"WARC-Payload-Digest\":\"sha1:UU32NWDEIAE5ETFAL2A4U53JA3YD2WNC\",\"WARC-Block-Digest\":\"sha1:IZ36DQMFJ3RSUNWU4KKR36PXZMSFDKHR\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2019/CC-MAIN-2019-30/CC-MAIN-2019-30_segments_1563195526324.57_warc_CC-MAIN-20190719161034-20190719183034-00462.warc.gz\"}"}