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

What is extern keyword in c?

639


What is malloc() function?

634


difference between native and cross compilers

1669


What is the basic structure of c?

551


Why do we use return in c?

565






How will you find a duplicate number in a array without negating the nos ?

1637


What are the disadvantages of a shell structure?

686


What is structure in c language?

615


Does c have function or method?

585


What is the difference between new and malloc functions?

574


How can I send mail from within a c program?

577


what is bit rate & baud rate? plz give wave forms

1512


Explain the difference between malloc() and calloc() in c?

573


What is "Hungarian Notation"?

633


a way in which a pointer stores the address of a pointer which stores the value of the target value a) reference b) allocation c) multiple indirection d) none

630