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

Input an array and then print the repeating characters??
Example:
Input:1,3,23,11,44,3,23,2,3.
Output:3,23
plz help me.... i want a code of it. In C language.

Answer Posted / ankit dhanna

#include<iostream.h>
#include<conio.h>
void main()
{
int a[8],i,j,k,temp[8];
k=0;
cout<<"enter 8 elements "<<endl;
for(i=0;i<8;i++)
{
cin>>a[i];
}

for(i=0;i<8;i++)
{
for(j=0;j<8;j++)
{
if((a[i]==a[j])&&(i!=j))
{

temp[k]=a[i];
k++;
}

}
}

for(i=0;i<k/2;i++)
{
cout<<"repeated element "<<temp[i];
}

getch();
}

Is This Answer Correct ?    16 Yes 15 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Find sqrt of 113 up to 3 decimal places.

1241


A train 100 meter long takes 3 second to cross a man walking at the rate of 6km/hr in a direction opposite to that of the train. Find the speed of the train.

1582


A question on "set" theory.it was given that less than 30 persons in class.

1196


pls send me andhra bank clerk model papers&syllabus

2267


solution of system of equations y-z=0,x+8y=4,3x+4y=7z is

1154


Four persons can cross a bridge in 3, 7, 13, 17 minutes. Only two can cross at a time. Find the minimum time taken by the four to cross the bridge.

1396


How long will a train 100m long travelling at 72kmph take to overtake another train 200m long travelling at 54kmph

1538


Two trains are travelling at equilateral .Train A is travelling in the direction of earths spin.Other train B is travelling in opposite direction of earths spin.Which trains wheels will wear first?and why?

2527


In a arithmetic reason 10,9,60,90,70 and 66.. .whats the next number with conclusion

2115


The minute hand of a clock overtakes the hour hand at intervals of 64 minutes of correct time. How much a day does the clock gain or lose?

1400


+ means * and * means / and / means % what is the value of these question 2+3*5/7 it was two question of these type.

1198


Next number in the series 1, 1/2, 1/4, 1/8 ?

1206


In a lock of 4 rings there r five characters how many unsuccessful attempts can be made ?

1308


A salesperson by mistake multiplied a number and got the answer as 3, instead of dividing the number by 3.What is the answer he should have actually got?

1421


The price of raw materials has gone up by 15%, labour cost has also increased from 25% of the cost of raw material to 30% of the cost of raw material. By how much percentage should there be a reduction in the usage of raw materials so as to keep the cost same

1585