1.find the second maximum in an array?
2.how do you create hash table in c?
3.what is hash collision

Answer Posted / vignesh1988i

#include<stdio.h>
#include<conio.h>
void soft(int *,int *);
void main()
{
int a[30],n;
printf("enter the number of elements going to enter :");
scanf("%d",&n);
for(int i=0;i<n;i++)
scanf("%d",a[i]);
soft(a);
printf("the second maximum in the given array is :");
getch();
}
void soft(int *a,int *n);
{
int temp;
for(int i=0;i<(*n);i++)
{
for(j=0;j<(*n);j++)
{
if(a[j+1]<a[j])
{
temp=a[j+1];
a[j+1]=a[j];
a[j]=temp;
}
}
}
printf("%d",a[n-1]);
}

sorry i dont know the concept of hash table!!!!!!!!!!!!!!!

Is This Answer Correct ?    1 Yes 18 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How reliable are floating-point comparisons?

621


What is the difference between Printf(..) and sprint(...) ?

778


What is the difference between scanf and fscanf?

656


What is a protocol in c?

552


What is the advantage of a random access file?

633






why return type of main is not necessary in linux

1695


What is file in c preprocessor?

646


What is the time and space complexities of merge sort and when is it preferred over quick sort?

667


Explain the use of 'auto' keyword

668


what are the program that using a two dimensional array that list the odd numbers and even numbers separately in a given 10 inputs values

1253


What is a pointer in c?

677


How do you use a pointer to a function?

621


What are keywords c?

594


a sequence of bytes with one to one corrspondence to those in the external device a) sequential addressing b) address c) byte code d) none

712


What is function prototype?

605