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 / amit rawat
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int ar[8]={2,3,4,5,2,9,8,7};
for(int i=0;i<8;i++)
{for(int j=i+1;j<8;j++)
{if(ar[i]==ar[j])
{cout<<"\n Repeated no is";cout<<ar[i];
}
}
}
getch();
}
Is This Answer Correct ? | 33 Yes | 14 No |
Post New Answer View All Answers
Two distinct no's are taken from 1,2,3,4......28. Find the probability that their sum is less than 13
If DBMDVUUB = CALCUTTA Then BOMBAY = ?
An article sold at a profit of 20% if both the cost price and selling price would be Rs.20/- the profit would be 10% more. What is the cost price of that article?
One watch is showing 30 past 3 .What is the angle between minutes & hours hand?
Work can be done by 8 men and 10 women in 25 days, the same work can be done by 10 children and 5 women . in how many days 2 children and 3 men can do the work?
A boy has Rs 2. He wins or loses Re 1 at a time If he wins he gets Re 1 and if he loses the game he loses Re 1. He can loose only 5 times. He is out of the game if he earns Rs 5. Find the number of ways in which this is possible?
Financial aptitude
A shopkeeper bought a watch for Rs.400 and sold it for Rs.500.What is his profit percentage?
Ram, Shyam and Gumnaam are friends.Ram is a widower and lives alone and his sister takes care of him. Shyam is a bachelor and his niece cooks his food and looks after his house. Gumnaam is married to Gita and lives in large house in the same town. Gita gives the idea that all of them could stay together in the house and share monthly expenses equally. During their first month of living together, each person contributed Rs.25. At the end of the month, it was found that Rs 92 was the expense so the remaining amount was distributed equally among everyone. The distribution was such that everyone received a whole number of Rupees. How much did each person receive?
If D is adjacent to F then who is adjacent to C?
Rajdhani Express starts from Delhi at 12:00 pm and reaches Chandigarh at 2:30 pm and Doronto Express starts from Chandigarh at 12:15 and reach at Delhi at 2:15 . What will be the time when both the trains will cross each other?
Write a C Program to declare an array for 2 0 floats. Accept the values from the user sort the two arrays in descending order. Merge the two arrays into a new array and display the new array.
i attended sbi clerical interview on28/04/10.on 20/08/10 i called sbi headoffice 022-22024619 they said tht final result will be declared after 2 months.i also had another no 022-22826300.if anybody are interested cal those no's.my mobile no is 9010347790(udamsingh)
Solve for x and y: 1/x - 1/y = 1/3, 1/x2 + 1/y2 = 5/9.
What kind of questions are there in Harbinger Aptitutde test paper(for 2011)and their paper pattern?Plz reply urgently.