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 / vignesh1988i
m minor modification
#include<stdio.h>
#include<conio.h>
void main()
{
int count;
char str[100];
printf("enter the string :");
gets(str);
for(int i=65;i<=122;i++)
{
count =0;
for(int j=0;str[j]!='\0';j++)
{
if(str[j]==(char)i)
{
printf("the character %c occurs %d times \n",i,count);
count++;
}
}
}
getch();
}
thank you
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What are keywords c?
Why c is a procedural language?
a number whose only prime factors are 2,3,5, and 7 is call humble number,,write a program to find and display the nth element in this sequence.. sample input : 2,3,4,11,12,13, and 100.. sample output : the 2nd humble number is 2,the 3rd humble number is 3,the 4th humble number is ,the 11th humble number is 12, the 12th humble number is 14, the 13th humble number is 15, the 100th humble number is 450.
"%u" unsigned integer print the a) address of variable b) value of variable c) name of a variable d) none of the above
1) There is a singing competition for children going to be conducted at a local club. Parents have been asked to arrive at least an hour before and register their children’s names with the Program Manager. Whenever a participant registers, the Program Manager has to position the name of the person in a list in alphabet order. Write a program to help the Program Manager do this by placing the name in the right place each time the Program Manger enters a name. The Logic should be written in Data Structures?
What are qualifiers in c?
Tell us the use of fflush() function in c language?
Which of the following operators is incorrect and why? ( >=, <=, <>, ==)
What are enums in c?
Explain how can type-insensitive macros be created?
Can include files be nested?
What is type qualifiers?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What are the application of c?
write a sorting prgm to sort 50 nos and sum them and also remove all the occurrences of 15 and print it?