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 features of the c language?
Explain the Difference between the New and Malloc keyword.
write a program to print the consecutive repeated character from the given string... input string is : hhhhjkutskkkkkggggj output should be like this: hhhhkkkkkgggg anyone help me...
What is hash table in c?
How to delete a node from linked list w/o using collectons?
What is chain pointer in c?
What is binary tree in c?
Why should I prototype a function?
How can I find the modification date and time of a file?
What is the general form of a C program?
What is the purpose of void in c?
What is variable initialization and why is it important?
What are pragmas and what are they good for?
What should malloc(0) do? Return a null pointer or a pointer to 0 bytes?
Differentiate call by value and call by reference?