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

1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision

Answer Posted / shanthi

#include<stdio.h>

int main()
{
int array[5]={2,3,4,6,5};
int max=a[0];
int sec=a[1];
for(i=0;i<5;i++)
{
if(a[i]>max)
max=a[i];
}

for(i=0;i<5;i++)
{
if((a[i]>sec )&&(a[i]<max))
{
sec=a[i];
}
}
printf("%d %d",max,sec);
}

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Can the curly brackets { } be used to enclose a single line of code?

1163


Write a program to print "hello world" without using a semicolon?

1055


What is an array in c?

1047


differentiate built-in functions and user – defined functions.

1083


Who is the main contributor in designing the c language after dennis ritchie?

997


Why we use stdio h in c?

1028


What is external variable in c?

1055


Write a program with dynamically allocation of variable.

1119


What is the purpose of realloc()?

1139


How can you determine the maximum value that a numeric variable can hold?

1228


There seem to be a few missing operators ..

1047


What are the general description for loop statement and available loop types in c?

1117


What is spark map function?

1122


Is null equal to 0 in sql?

1146


How can I copy just a portion of a string?

1308