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
Explain logical errors? Compare with syntax errors.
What is the difference between array and structure in c?
Which operators cannot be overloaded a) Sizeof b) .* c) :: d) all of the above
Write a program on swapping (100, 50)
What are the different types of objects used in c?
What is the difference between class and object in c?
What are the types of data types and explain?
Write a program with dynamically allocation of variable.
What functions are used in dynamic memory allocation in c?
write a c program to print the next of a particular no without using the arithmetic operator or looping statements?
Write a program to reverse a linked list in c.
What is return in c programming?
What is meant by type casting?
the constant value in the case label is followed by a a) semicolon b) colon c) braces d) none of the above
What is dynamic dispatch in c++?