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

ques-Input an array and prints the second minimum in an array??
Example
Input:34,45,21,12,54,67,15
Output:15
I want a solution in C/C++ language

Answer Posted / om prakash

#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int ar[6]={21,23,14,65,2,35};
int min1=ar[0],min2=ar[0];
for(int i=1;i<6;i++)
{
if(min1<ar[i])
{
int min2=min1;
min1=ar[i];
}
}
print(min2);
getch();

Is This Answer Correct ?    2 Yes 3 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Find the correct meaning of the following phrase: To bite the dust

1079


Find the next series: SE QU EN TI ?

1268


In a classroom, a student is ranked 12th from right and 9th from left. How many students are there in total?

1144


There are 150 weights .Some are 1 kg weights and some are 2 kg weights. The sum of the weights is 260.What is the number of 1kg weights?

1338


present ages of sameer and anand are in the ratio of 5 : 4 respectively. Three years hence, the ratio of their ages will become 11 : 9 respectively. What is anand's present age in years?

1227


13_46_8_180_210_75 = 64 . Use + and – in the empty places to make the equation holds good. Take m = number of + and n = number of – . Find m – n?

1170


If the ratio of the areas of 2 queres is 2:1, then the ratio of the perimeters of the squares is

1117


What is the difference between control module

1710


Ram starts from A walking 2 km North and turns right and walks 4 km and turns right again and walks 4 km and turns right again and walks 4 km and meets Radha at Bwalking in the opposite direction to Ram . Distance between A and B

1449


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

1980


Given the length of the 3 sides of a triangle.Find the one that is impossible? (HINT : sum of smaller 2 sides is greater than the other one which is larger)

1199


Hansie made the following amounts in seven games of cricket in India: Rs.10, Rs.15, Rs.21, Rs.12, Rs.18, Rs.19 and Rs.17(all figures in crores of course).Find his average earnings.

1394


A clock with the hours round the face in Roman block numbers, as illustrated in the sketch fell down and the dial broke into four parts....

2491


The ratio of the number of boys and girls in a college is 3:2. Out of these 10 percent are boys and 25 percent are girls are scholarship holders. Find the no of boys and girls who are not scholarship holders.

1346


A robber steals half the total no of pastry plus 1/2 tray from a pastry shop. A second robber steals half the remaining no of pastry plus 1/2 tray and so on. After the 5th thief has stolen there are no more pastry left in the pastry shop. What was the total no of pastry did the pastry shop have at the beginning.

1219