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 a void * in c?
How many keywords are there in c?
c program to compute AREA under integral
What is meant by recursion?
What is wrong with this declaration?
please send me the code for multiplying sparse matrix using c
Is array a primitive data type in c?
What are the application of void data type in c?
What are the advantages of Macro over function?
What is the difference between āgā and āgā in C?
What is the 'named constructor idiom'?
Hi can anyone tell what is a start up code?
Which of these functions is safer to use : fgets(), gets()? Why?
What is a const pointer?
What are structure types in C?