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
Explain the difference between strcpy() and memcpy() function?
A program is required to print your biographic information including: Names, gender, student Number, Cell Number, line of study and your residential address.
Is it possible to initialize a variable at the time it was declared?
How can I find out how much free space is available on disk?
A variable that is defined in a specified portion of a program but can be used throughout the program a) global variable b) local variable c) character d) none
write a program to print largest number of each row of a 2D array
What is c variable?
List at least 10 sorting methods indicating their average case complexity, worst case complexity and best case complexity.
How are structure passing and returning implemented?
Can we declare variables anywhere in c?
largest Of three Number using without if condition?
Do character constants represent numerical values?
All technical questions
What is the difference between mpi and openmp?
What are header files? What are their uses?