#include <stdio.h> int main() { char string[100]; int c = 0, count[26] = {0}; printf("Enter a string"); gets(string); while ( string[c] != '\0' ) { if ( string[c] >= 'a' && string[c] <= 'z' ) count[string[c]-'a']++; c++; } for ( c = 0 ; c < 26 ; c++ ) { if( count[c] != 0 ) printf("%c occurs %d times in the entered string.\n",c+'a',count[c]); } return 0; }
Most Popular
-
Befunge: Developed by : Chris Pressey Year: 1993 ...
-
-
The list below is an unordered list. You can pick any...
-
Recursion happens when function calls itself directly...
Copyrights © 2016 Codzya. Powered by Blogger.
Friday, May 13, 2016
Subscribe to:
Post Comments (Atom)
- Recent
- Weekly
- Comment
Recent
As a task executes it utilizes the processor...
Sep 25 2016 | Read moreMemory leak occurs when programmers create a memory in heap and...
Aug 19 2016 | Read moreBefunge: Developed by : Chris Pressey Year: 1993 Stack-based,...
May 19 2016 | Read more1- The C Programming Language This book is a comprehensive...
May 18 2016 | Read more1. Java The tech community recently celebrated the 20th...
May 17 2016 | Read more
Weekly
-
Befunge: Developed by : Chris Pressey Year: 1993 ...
-
-
The list below is an unordered list. You can pick any...
-
Recursion happens when function calls itself directly...
-
1- The C Programming Language This book is a...
Comment
Get this Recent Comments Widget
0 Comment to "Calculate Alphabets Of String."
Post a Comment