WAP TO ACCEPT STRING AND COUNT A COMES N TIMES B COMES N
TIMES C COMES N TIMES D COMES N TIMES AND SO ON.........
AT LAST UNTIL Z COMES N TIMES...............
Answer Posted / priyanka
#include<stdio.h>
#include<conio.h>
void main()
{
int i,j,count;
char str[100];
clrscr();
printf("enter the string :");
gets(str);
for(i=65;i<=122;i++)
{
count =1;
for(j=0;str[j]!='\0';j++)
{
if(str[j]==i)
count++;
}
printf("the character %c occurs %d times \n",i,count);
}
getch();
}
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
How can I pad a string to a known length?
Function calling procedures? and their differences? Why should one go for Call by Reference?
What is structure in c definition?
Do variables need to be initialized?
What is structure of c program?
What is structure padding and packing in c?
What is Dynamic memory allocation in C? Name the dynamic allocation functions.
a single linked list consists of nodes a to z .print the nodes in reverse order from z to a using recursion
I need testPalindrome and removeSpace
#include
What is the best way to store flag values in a program?
Write a function stroverlap that takes (at least) two strings, and concatenates them, but does not duplicate any overlap. You only need to worry about overlaps between the end of the first string and the beginning of the second string. Examples: batman, manonthemoon = batmanonthemoon batmmamaman, mamamanonthemoon = batmmamamanonthemoon bat, man = batman batman, batman = batman batman, menonthemoon = batmanmenonthemoon
Do you know the purpose of 'register' keyword?
What are the main characteristics of c language describe the structure of ac program?
How can I open files mentioned on the command line, and parse option flags?
How can I change the size of the dynamically allocated array?