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 #define size in c?
Explain the use of 'auto' keyword
Do you know the difference between exit() and _exit() function in c?
Tell me when is a void pointer used?
explain what is fifo?
What is const keyword in c?
What are the loops in c?
What is d'n in c?
Function which gives a pointer to a binary trees const an integer value at each code, return function of all the nodes in binary tree.?
Is it possible to use curly brackets ({}) to enclose single line code in c program?
How many data structures are there in c?
What is meant by inheritance?
What is pragma in c?
What does 3 mean in texting?
What is the best way to comment out a section of code that contains comments?