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 program to find the frequency of a number

Answer Posted / vikky_manit

#include<stdio.h>
void main()
{
int a[10],n,key,count=0;
printf("Enter the number of elements\n");
scanf("%d",&n);
printf("Enter %d elements\n",n);
for(i=0;i<n;i++)
scanf("%d",&a[i]);
printf("Enter the element whose frequency is to be
determined\n");
scanf("%d",key);
for(i=0;i<n;i++)
if(key==a[i])
count++;
printf("Frequency=%d",count);
}

Is This Answer Correct ?    39 Yes 36 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What does calloc stand for?

1082


What are structural members?

953


What is c language in simple words?

1008


Tell me is null always defined as 0(zero)?

1033


Why do we use stdio h and conio h?

1031


Write a program for Overriding.

1119


What is calloc() function?

1047


Explain the Difference between the New and Malloc keyword.

1077


What is variable in c example?

991


What is the difference between int main and void main?

996


What is floating point constants?

1079


How many types of sorting are there in c?

1010


When is a null pointer used?

1061


write a c program thal will find all sequences of length N that produce the sum is Zero, print all possible solutions?

2810


Explain how does flowchart help in writing a program?

1060