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
How reliable are floating-point comparisons?
What is the difference between Printf(..) and sprint(...) ?
What is the difference between scanf and fscanf?
What is a protocol in c?
What is the advantage of a random access file?
why return type of main is not necessary in linux
What is file in c preprocessor?
What is the time and space complexities of merge sort and when is it preferred over quick sort?
Explain the use of 'auto' keyword
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
What is a pointer in c?
How do you use a pointer to a function?
What are keywords c?
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
What is function prototype?