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
What are the 3 types of structures?
What does %p mean c?
What is d scanf?
What does s c mean on snapchat?
What is the difference between text files and binary files?
What is a lvalue
Compare and contrast compilers from interpreters.
Explain how can you tell whether a program was compiled using c versus c++?
What are examples of structures?
How can I sort a linked list?
What is break statement?
In c programming typeing to occupy the variables in memory space. if not useing the variable the memory space is wasted.ok, how to avoid the situation..? (the variable is used & notused)
What is scope of variable in c?
List the difference between a While & Do While loops?
What is the difference between malloc calloc and realloc in c?