Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

the real constant in c can be expressed in which of the following forms a) fractional form only b) exponential form only c) ascii form only d) both a and b

2677


When should volatile modifier be used?

1012


Explain the difference between the local variable and global variable in c?

1073


Write a program to print ASCII code for a given digit.

1093


largest Of three Number using without if condition?

1602


Explain what is the difference between functions getch() and getche()?

1052


Does c have enums?

1102


How can I recover the file name given an open stream or file descriptor?

1082


What is meant by high-order and low-order bytes?

1050


In a switch statement, what will happen if a break statement is omitted?

1060


Where does the name "C" come from, anyway?

1166


What are preprocessor directives in c?

1102


What are the advantages of union?

1071


What is the correct code to have following output in c using nested for loop?

1082


What is advantage of pointer in c?

1185