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
What is extern keyword in c?
What is malloc() function?
difference between native and cross compilers
What is the basic structure of c?
Why do we use return in c?
How will you find a duplicate number in a array without negating the nos ?
What are the disadvantages of a shell structure?
What is structure in c language?
Does c have function or method?
What is the difference between new and malloc functions?
How can I send mail from within a c program?
what is bit rate & baud rate? plz give wave forms
Explain the difference between malloc() and calloc() in c?
What is "Hungarian Notation"?
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