Answers

2014-03-13T07:59:50+05:30
In general we count from 0 to no.... E.g.
int a[]=new int[10]. So i has 9 elements. 
But easiest way is total -1 i mean to say In above e.g. there are how many element? 10 ohk ... now -1 it have 9 elements according to computer got that.
BEST OF Luck
1 1 1
2014-03-15T19:49:25+05:30
Let may be you generated array already and declared elements of it..
then..
int count=1;
for(int i=0;i<n;I++)
{
  for(j=0;j,N;J==00
{
  If(a[i]==a[j])
{
 count=count+1;
}
print "element"+a[i]+"repeated for"+count+"times";
count=1;
}

o/p:
let array e a[]={1,2,3,4,1,1,2,,3,3,3};
then 1 repeated for 3 times
2 repeated for 2times
3 repeated for 4 times...so on..:)
keep smiling...
0