answersLogoWhite

0


Best Answer

/* For a short string, like "abaz" a Hashmap like (a:2, b:1, z:1) will be shorter, than a whole alphabet*/

#include<stdio.h>

#include<conio.h>

main()

{

int count,i,j;

char str[50];

printf("Enter string : ");

gets(str);

for(i=0;i<=strlen(str)-1;i++)

{

count=1;

if(str[i]==' ')

continue;

for(j=i+1;j<=strlen(str)-1;j++)

{

if(str[i]==str[j])

{

str[j]=' ';

count++;

}

}

printf("%c : %d \n",str[i],count);

}

getch();

}

/*Answered by Ankush Monga

Doing DOEACC B level*/

User Avatar

Wiki User

12y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

11y ago

Here is simple code in plain C:

# include<stdio.h>

#include<string.h>

void main()

{

char str[220];

char a[]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";

int i,j,count;

printf("enter a string: ");

gets(str);

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

{

for(j=0;j<52;j++)

{

if(a[j]==str[i])

count++;

break;

}

}

printf("\nNo. of alphabets enteres in the string = %d",count);

}

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a 'c' program to calculate the frequencies of different alphabets present in a given string the string of alphabets is to be taken as input from the keyboard?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Why keyboard's alphabets are not in que?

It's based on frequencies of letter combinations. Like 'E' and 'R' are together.


Do Muslims use the same kind of computer keyboard as you do?

Of course they do. Keyboards are defined by the alphabet of the language in use. The 'standard' QWERTY keyboard is used in many languages which can be designated by the operating system. Languages that have different alphabets have a different keyboard layout to reflect the symbols used by that language.


Location of number key in the keyboard?

It's on the far right of the keyboard known as numpad and also there are number keys above the alphabets on your keyboard.


What is importance of insert menu in microsoft word?

It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.It allows you to insert lots of things, like unusual symbols that are not on your keyboard or letters from other alphabets or fields. It lets you put in different kinds of breaks, like page breaks. It lets you insert other objects like text boxes and pictures.


Can you connect a bass guitar and a keyboard to a bass amp?

The short answer is Yes. However, a BASS amp i s intended to amplify low frequencies and all of the tone controls are designed to enhance these frequencies. The speakers are usually designed for the lower frequencies as well, so you will find that the keyboard will not sound as detailed as it might if used with an amplifier designed for guitar or keyboards, as the upper frequencies of the keyboard through a bass amp will be attenuated.


What is a keyboard and what is it used for?

A keybord is a number of keys with numbers and alphabets, useful for giving inputs to CPU for processing purpose.


Full form of keyboard?

keys electronic yet board operation a-z reasons directly........................


How many alphabets can you get on a computer keyboard?

Virtually every writing system in common use is available for PC and Mac, as well as many extinct and liturgical writing systems.Some alphabets would require software to help with the input method.


Do wireless keyboards send data to the computer using microwave frequencies?

Whether a wireless computer keyboard uses microwave frequencies for communication with the computer depends on the technology used by the keyboard, and on the definition of microwave frequencies. Wikipedia defines microwave frequencies to be in the 1...30GHz range. Many wireless keyboards operate in the 2.4GHz band, which would make them microwave transmitters (and receivers). Other keyboards use different frequencies, below 1GHz. Those would not be microwave devices, according to this definition. The 802.15.4 standard, for example, lists a 868.0-868.6MHz band (Europe), 902..928MHz (US) and the 2.4GHz (2400...2483.5 MHz) band (worldwide, but subject to regional restrictions).


How do keyboards evolve?

The keyboard evolved from the typewriter prototype, and as computing has become ingrained into our lives it has evolved with us. The biggest evolution that occurs to keyboards is in other countries which use different alphabets, such as Japanese or Arabic. Otherwise keyboards do not change much, which can be helpful for those of us who can type up a storm without ever looking down at the keys we are pressing. Today we are able to choose for a lot of different keyboard designs, or even better, to create your own keyboard to suit your needs.


What language has the same keyboard setup as English?

No other official language has the exact same keyboard layout as English, but there are variants of the traditional, English QWERTY layout. In fact, there are variants designed for US English, UK English, and English-based international keyboards. Although the QWERTY layout has been the foundation for several other keyboard designs over the years--primarily those designed for use with Spanish--other languages have their own layouts, as well. Reasons for this include the differences in alphabets, letter/character frequencies, accents, and official symbols used in different countries. Although it is not directly related to the question at hand, it is also common for programmers, worldwide, to use some form of English keyboard for work, because most computer programming languages are designed for English.


Why cant F11 and F12 be found on the standard keyboard?

They are on a Standard Keyboard. You must have a different kind if they are not there.F11 & F12 are on a standard keyboard and a Mac keyboard. You are not using a standard keyboard if they are missing.