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
HOW TO SOLVE A NUMERICAL OF LRU IN OS ??????
What are the string functions? List some string functions available in c.
What are types of functions?
Why is a semicolon (;) put at the end of every program statement?
What are multidimensional arrays?
Explain how can I manipulate strings of multibyte characters?
What is the use of typedef in c?
Why do we need arrays in c?
Why is it important to memset a variable, immediately after allocating memory to it ?
how is the examination pattern?
What is a volatile keyword in c?
What is the hardest programming language?
Define Spanning-Tree Protocol (STP)
why to assign a pointer to null sometimes??how can a pointer we declare get assigned with a garbage value by default???
What are the advantage of c language?