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

There N stations on a railroad. After adding x stations 46 additional tickets have to be printed. Find N and X.

1169


2, 3, 6, 7--- using these numbers form the possible four digit numbers that are divisible by 4.

1192


Two trains are traveling in 60 kmph on same trace, towards each other. When the distance between them is 18 km, a fly is going to start, flying between them in 80 kmph speed. Find the traveling path distance of the fly upto when it is going to crush by the 2 trains?

1142


A & B can do a piece of work in 21 & 24 days respectively. The started to work together but after some days BA leaves, B completes the remaining work in 9 days. After how many days does A leaves

1227


please let me know the minimum qualifying marks in screening test of group1 2010 to be eligible for group1 main exam.

2873


In simple interest what sum amounts of Rs.1120/- in 4 years and Rs.1200/- in 5 years.

1536


A mother is 30 years older than her daughter however she will be only thrice as old as the daughter after 5 years. What is mother’s present age ?

1210


How Can A Cake(circular) Be Cut Into 8 Pieces By Making Just 3 Cuts?

1143


There are 5 questions based on a murder story.the questions concentrate on the seating arrangements of people mentioned.

1260


Two persons start at the same point, walk in opposite directions with 5km/hr and 5.5km/hr respectively. What is the distance separated after 2 and half hrs?

2100


a grandfather has 5 sons and daughters and grandchildren.they have to be arranged in a row such that the first 4 seats and last four seats are to be taken by grandchildren and the grandfather would not sit adjacent to any of the grandchildren.

2935


How many digits will be there to the right of the decimal point in the product of 95.75 and .02554 ?

1178


what is diff b//w the singly reinforced beam,doubly reinforced beam?

1871


4 pipes inlet and 2 pipes outlets, find water inlet etc.

10543


A says Party was held on :Thursday ,May 8th. B says Party was held on :Tuesday,May 10th. C says party was held on :Friday ,June 8th. Given April 1 st was Tuesday.one of A,B,C says 1 correct.one says 1 wrong.and one was completely wrong of date,Month and day. Find the Day the party held.

1536