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

What is the sizeof () operator?

1041


Write a program to check whether a number is prime or not using c?

1020


What is declaration and definition in c?

1041


Explain the difference between exit() and _exit() function?

1130


What are logical errors and how does it differ from syntax errors?

1253


Do array subscripts always start with zero?

1256


What is putchar() function?

1103


What is the significance of scope resolution operator?

1372


What is use of null pointer in c?

980


Between macros and functions,which is better to use and why?

2148


Why array is used in c?

985


What are lookup tables in c?

972


What is sizeof array?

1026


What is call by value in c?

975


What is the difference between if else and switchstatement

1885