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

In a helpful book on the indexing and searching of text-based electronic files, a well-respected computer scientist differentiated _____________________ search efficiently using augmented inverted indices. latent semantic indexing, which is a technique designed to analyze relationships among the words within documents, with vector space models, which can between latent semantic indexing, which is a technique designed to analyze relationships among the words within documents, and vector space models, which can between latent semantic indexing, which is a technique designed to analyze the relationships among words within documents, with vector space models, which can latent semantic indexing, which is a technique designed to analyze the relationships among words within documents, and vector space models, which can

2025


If ABC =C3C3 and CAB = D3D3, Then find D3÷B3D3÷B3

1566


A ship is away from the shore by 180 miles.A plane is travelling at 10 times speed of the ship.How long from the shore will they meet?

1578


.Both A and B Alice and Bob play the following chip-off-the-table game. Given a pile of 58 chips, Alice first picks at least one chip but not all the chips. In subsequent turns, a player picks at least one chip but no more than the number picked on the previous turn by the opponent. The player to pick the last chip wins. Which of the following is true?

2851


Find the correct choice if the sum of any 4 consecutive numbers is divisible by a number?

1292


A person walking 5/6 of his usual rate is 40 minutes late. What is his usual time?

1441


how 1000000000 can be written as a product of two factors neither of them containing zeros

1182


Three men A, B, C can complete a work separately in some specified days (May be 8, 7, 6).If they do the work together by alternate days. Then how many days need to complete the work?

1316


A chain is broken into three pieces of equal lengths containing 3 links each. It is taken to a backsmith to join into a single continuous one . How many links are to to be opened to make it ?

2116


how can i improve myself in solving apptitude questions, guide and help me with some kind of tips.suggest me books too.so that i can get betterment in solving apps

3151


Reversing the digits of father's age we get son's age. One year ago father was twice in age of that of his son? find their current ages?

1515


A Lorry starts from Banglore to Mysore At 6.00 a.m, 7.00 a.m, 8.00 a.m.....10 p.m. Similarly another Lorry on another side starts from Mysore to Banglore at 6.00 a.m, 7.00 a.m, 8.00 a.m.....10.00 p.m. A Lorry takes 9 hours to travel from Banglore to Mysore and vice versa.?

1175


A man walks east and turns right and then from there to his left and then 45degrees to his right.In which direction did he go ?

1182


In a soap company a soap is manufactured with 11 parts. For making one soap you will get 1 part as scrap. At the end of the day u have 251 such scraps. From that how many soaps can be manufactured?

1327


In a class there are 45 pupil, out of them 12 are in debate only and 22 in singing only. Then how many in both?

1597