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
How can I trap or ignore keyboard interrupts like control-c?
What is d'n in c?
What is time complexity c?
What is the value of a[3] if integer a[] = {5,4,3,2,1}?
The difference between printf and fprintf is ?
code for replace tabs with equivalent number of blanks
what is a constant pointer in C
List some of the dynamic data structures in C?
What is pointer and structure in c?
How many types of errors are there in c language? Explain
What is meant by recursion?
how do you execute a c program in unix.
What is the g value paradox?
Explain how do you print only part of a string?
Should I learn c before c++?