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 %c do in c?

995


Explain the red-black trees?

1134


What is #line in c?

1019


What extern c means?

1005


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

1921


Write program to remove duplicate in an array?

1088


Write a program to reverse a string.

1086


How do you define a function?

1032


What are Macros? What are its advantages and disadvantages?

1168


How pointer is different from array?

1088


Write a program to check whether a number is prime or not using c?

1060


Why c is called procedure oriented language?

1055


What are the 5 data types?

1145


Explain what are the standard predefined macros?

1122


What language is windows 1.0 written?

1070