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...

write a programe returns the number of times the character
appears in the string

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void main()
{
char a[50],q;
int count =0;
printf("enter the sring :");
gets(a);
printf("enter the char. to be searched :");
scanf("%c",&q);
for(int i=0;a[i]!='\0';i++)
{
if(a[i]==f)
count++;
}
printf("the occurance is :%d",count);
getch();
}

Is This Answer Correct ?    3 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the types of bitwise operator?

1107


What is #error and use of it?

1275


Are the variables argc and argv are always local to main?

1020


What is meant by keywords in c?

1068


Where is c used?

1092


what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?

1859


What is 2c dna?

1075


What is the use of bit field?

1175


What is a void pointer? When is a void pointer used?

1060


What is the purpose of type declarations?

1114


Write a C program to count the number of email on text

1913


Why is this loop always executing once?

1054


Explain how can you restore a redirected standard stream?

1097


What is a double c?

983


What does dm mean sexually?

1305