Blog Details
#include<stdio.h>
#include<stdlib.h>
int calculateFrequency(int *arr, int size)
{
int *frequency;
int i;
int count = 1;
int j;
frequency = (int *) malloc( 10 * sizeof(int));
for (i = 0; i < size; i++)
{
frequency[i] = -1;
}
for(i=0; i<size; i++)
{
for (j=i+1; i<= size; j++)
{
if(arr[i] == arr[j])
{
count++;
frequency[j]=0;
// printf ("%d", count);
}
}
}
printf("%d", arr[i]);
}
void main()
{
int size = 10 , i;
int *arry;
arry = (int * ) malloc (10*sizeof ( int));
// calculateFrequency(arry, size);
for (i=0;i<size;i++)
{
printf ("Enter Array elements at %d:", i);
scanf("%d", &arry[i]);
}
for (i=0;i<size;i++)
{
printf ("%d\t", arry[i]);
}
}