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
An expression to whose value an operater is applied a) operand b) variable c) constant d) all of the above
Explain how do I determine whether a character is numeric, alphabetic, and so on?
What's the difference between constant char *p and char * constant p?
What will be the outcome of the following conditional statement if the value of variable s is 10?
What is c method?
Can you please explain the difference between malloc() and calloc() function?
How would you obtain the current time and difference between two times?
What is cohesion and coupling in c?
How many types of operator or there in c?
swap 2 numbers without using third variable?
What is the difference between exit() and _exit() function in c?
Write a program to implement queue.
How many parameters should a function have?
Explain About fork()?
Write a program which returns the first non repetitive character in the string?