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
Can the curly brackets { } be used to enclose a single line of code?
Write a program to print "hello world" without using a semicolon?
What is an array in c?
differentiate built-in functions and user – defined functions.
Who is the main contributor in designing the c language after dennis ritchie?
Why we use stdio h in c?
What is external variable in c?
Write a program with dynamically allocation of variable.
What is the purpose of realloc()?
How can you determine the maximum value that a numeric variable can hold?
There seem to be a few missing operators ..
What are the general description for loop statement and available loop types in c?
What is spark map function?
Is null equal to 0 in sql?
How can I copy just a portion of a string?