Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main(){
- char paragraph[] = "AMERICAN INTERNATIONAL UNIVERSITY-BANGLADESH (AIUB) envisions promoting professionals and excellent leadership catering to the technological progress and development needs of the country.";
- int i, frequency[256] = {0};
- for(i=0; paragraph[i] != '\0'; i++)
- {
- frequency[paragraph[i]]++;
- }
- printf("Character \tFrequency\n");
- for(i=0; i < 256; i++)
- {
- if(frequency[i] != 0)
- {
- printf(" %c \t\t%d\n",i,frequency[i]);
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement