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

if the sum of five consecutive nos. 35? how many prime numbers are there :

1208


If wind flows 160 miles in 330 min, for 80 miles how much time required.

1261


A bus started from bustand at 8.00am, and after staying for 30 minutes at a destination, it returned back busstand. The destination is 27 miles from the busstand. The speed of the bus is 18mph. During the return journey bus travels with 50% faster speed.At what time does it return to the busstand?

1276


A certain street has 500 buildings. A sign-maker is contracted to number the houses from 1 to 500. How many zeroes will he need?

1780


The mean of 100 bags was found to be 30. What will be the correct mean if at the time of calculation two bags were wrongly taken as 32 and 12 instead of 23 and 11?

1477


A man shapes 3 cardboards in 50 minutes,how many cardboards does he shape in 5 hours? answer 18cardboards.

1302


Find the next number in the series 12,21,,112,121,122---

1269


aptitude questions

8506


A works thrice as much as B. If A takes 60 days less than B to do a work then find the number of days it would take to complete the work if both work together?

1317


A & B are playing a game .There are 8 oranges in a row on the table.one Player can take 1-4 oranges in a pick (a maximum of 4),one who picks the last orange wins the game.'A' plays first How many oranges should he pick first time inorder to win the game.

1271


Ramesh working alone on a job takes 12 days more than what he would have taken if Suresh had worked along with him while Suresh working alone on the same job takes 27 days more than what he would have taken if Ramesh had worked along with him. Find the time that both of them would take together to do the job.

1213


How would you measure 4 liters using jugs of 3l and 5l? Give a few solutions to this problem?

1320


how to get the system time dynamically in orcle

2179


A fold density is 19 times greater than the water and for copper it is 9 times.At what ratio you can mix gold and copper to get 15 times denser than water.

1289


One dog tells the other that there are two dogs in front of me. The other one also shouts that he too had two behind him. How many are they?

1720